FontColorConfig
interface
The configuration of the font color and font background color features. This option is used by the FontColorEditing and FontBackgroundColorEditing features.
ClassicEditor
.create( {
fontColor: ... // Font color feature configuration.
fontBackgroundColor: ... // Font background color feature configuration.
} )
.then( ... )
.catch( ... );Copy codeSee all editor options.
Properties
colorPicker?: false | ColorPickerConfigmodule:font/fontconfig~FontColorConfig#colorPickerConfiguration of the color picker feature.
If set to
falsethe picker will not appear.colors?: Array<ColorOption>module:font/fontconfig~FontColorConfig#colorsAvailable font colors defined as an array of strings or objects.
The default value is the shared default color palette, shown in
defaultColorGridColumnscolumns.Note: The colors are displayed in the
'fontColor'dropdown.columns?: numbermodule:font/fontconfig~FontColorConfig#columnsRepresents the number of columns in the font color dropdown.
The default value is:
Copy codeconst fontColorConfig = { columns: 12 }documentColors?: numbermodule:font/fontconfig~FontColorConfig#documentColorsDetermines the maximum number of available document colors. Setting it to
0will disable the document colors feature.By default it equals to the
columnsvalue.Examples:
Copy code// 1) Neither document colors nor columns are defined in the configuration. // Document colors will equal 12, // because the value will be inherited from columns, // which has a predefined value of 12. const fontColorConfig = {} // 2) Document colors will equal 8, because the value will be inherited from columns. const fontColorConfig = { columns: 8 } // 3) Document colors will equal 24, because it has its own value defined. const fontColorConfig = { columns: 8, documentColors: 24 } // 4) The document colors feature will be disabled. const fontColorConfig = { columns: 8, documentColors: 0 }