Sign up (with export icon)

FontColorConfig

Api-interface iconinterface

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 code

See all editor options.

Properties

  • Chevron-right icon

    Configuration of the color picker feature.

    If set to false the picker will not appear.

  • Chevron-right icon

    Available font colors defined as an array of strings or objects.

    The default value is the shared default color palette, shown in defaultColorGridColumns columns.

    Note: The colors are displayed in the 'fontColor' dropdown.

  • Chevron-right icon

    columns?: number

    Represents the number of columns in the font color dropdown.

    The default value is:

    const fontColorConfig = {
    	columns: 12
    }
    Copy code
  • Chevron-right icon

    Determines the maximum number of available document colors. Setting it to 0 will disable the document colors feature.

    By default it equals to the columns value.

    Examples:

    // 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
    }
    Copy code