Module

font/utils

@ckeditor/ckeditor5-font/src/utils

module

Filtering

Constants

Functions

  • addColorTableToDropdown( config = { config.dropdownView, config.colors, config.removeButtonLabel, config.documentColorsLabel, config.documentColorsCount } ) → ColorTableView

    static

    A helper that adds ColorTableView to the color dropdown with proper initial values.

    Parameters

    config : Object

    The configuration object.

    Properties
    config.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

    static

    Builds a proper converter definition out of input data.

    Parameters

    modelAttributeKey : String

    Key

    options : Array.<FontFamilyOption> | Array.<FontSizeOption>

    Returns

    ConverterDefinition
  • renderDowncastElement( styleAttr )

    static

    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

    static

    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