font/utils
@ckeditor/ckeditor5-font/src/utils
Filtering
Constants
-
FONT_BACKGROUND_COLOR
module:font/utils~FONT_BACKGROUND_COLOR
The name of the font background color plugin.
-
FONT_COLOR
module:font/utils~FONT_COLOR
The name of the font color plugin.
-
FONT_FAMILY
module:font/utils~FONT_FAMILY
The name of the font family plugin.
-
FONT_SIZE
module:font/utils~FONT_SIZE
The name of the font size plugin.
Functions
-
addColorTableToDropdown( config = { config.dropdownView, config.colors, config.removeButtonLabel, config.documentColorsLabel, config.documentColorsCount } ) → ColorTableView
module:font/utils~addColorTableToDropdown
A helper that adds
ColorTableView
to the color dropdown with proper initial values.Parameters
config : Object
The configuration object.
Propertiesconfig.dropdownView : DropdownView
The dropdown view to which a
ColorTableView
will be added.config.colors : Array.<ColorDefinition>
An array with definitions representing colors to be displayed in the color table.
config.removeButtonLabel : String
The label for the button responsible for removing the color.
config.documentColorsLabel : String
The label for the section with document colors.
config.documentColorsCount : String
The number of document colors inside the dropdown.
Returns
ColorTableView
The new color table view.
-
buildDefinition( modelAttributeKey, options ) → ConverterDefinition
module:font/utils~buildDefinition
Builds a proper converter definition out of input data.
Parameters
modelAttributeKey : String
Key
options : Array.<FontFamilyOption> | Array.<FontSizeOption>
Returns
-
renderDowncastElement( styleAttr )
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
-
renderUpcastAttribute( styleAttr ) → 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
String
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.