font/utils
@ckeditor/ckeditor5-font/src/utils
Filtering
Constants
-
FONT_BACKGROUND_COLOR : 'fontBackgroundColor'
module:font/utils#FONT_BACKGROUND_COLOR
The name of the font background color plugin.
-
FONT_COLOR : 'fontColor'
module:font/utils#FONT_COLOR
The name of the font color plugin.
-
FONT_FAMILY : 'fontFamily'
module:font/utils#FONT_FAMILY
The name of the font family plugin.
-
FONT_SIZE : 'fontSize'
module:font/utils#FONT_SIZE
The name of the font size plugin.
Type Definitions
-
ColorSelectorDropdownView
module:font/utils~ColorSelectorDropdownView
-
FontConverterDefinition
module:font/utils~FontConverterDefinition
Functions
-
addColorSelectorToDropdown( __namedParameters = { __namedParameters.colorPickerLabel, __namedParameters.colorPickerViewConfig, __namedParameters.colors, __namedParameters.columns, [__namedParameters.documentColorsCount], [__namedParameters.documentColorsLabel], __namedParameters.dropdownView, __namedParameters.removeButtonLabel } ) → ColorSelectorView
module:font/utils~addColorSelectorToDropdown
A helper that adds
ColorSelectorView
to the color dropdown with proper initial values.Parameters
__namedParameters : object
-
Properties
__namedParameters.colorPickerLabel : string
__namedParameters.colorPickerViewConfig : false | ColorPickerViewConfig
__namedParameters.colors : Array<ColorDefinition>
__namedParameters.columns : number
[ __namedParameters.documentColorsCount ] : number
[ __namedParameters.documentColorsLabel ] : string
__namedParameters.dropdownView : ColorSelectorDropdownView
__namedParameters.removeButtonLabel : string
Returns
ColorSelectorView
The new color selector view.
-
buildDefinition( modelAttributeKey, options ) → FontConverterDefinition
module:font/utils~buildDefinition
Builds a proper converter definition out of input data.
Parameters
modelAttributeKey : string
options : Array<FontFamilyOption> | Array<FontSizeOption>
Returns
-
renderDowncastElement( styleAttr ) → ( string, DowncastConversionApi ) => AttributeElement
module:font/utils~renderDowncastElement
A font color and font background color helper responsible for downcasting a color attribute to a
<span>
element.Note: The
styleAttr
parameter should be either'color'
or'background-color'
.Parameters
styleAttr : string
Returns
( string, DowncastConversionApi ) => AttributeElement
-
renderUpcastAttribute( styleAttr ) → ( Element ) => string
module:font/utils~renderUpcastAttribute
A font color and font background color helper responsible for upcasting data to the model.
Note: The
styleAttr
parameter should be either'color'
or'background-color'
.Parameters
styleAttr : string
Returns
( Element ) => string
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.