Interface

HighlightOption (highlight)

@ckeditor/ckeditor5-highlight/src/highlightconfig

interface

The highlight option descriptor. See HighlightConfig to learn more.

{
	model: 'pinkMarker',
	class: 'marker-pink',
	title: 'Pink Marker',
	color: 'var(--ck-highlight-marker-pink)',
	type: 'marker'
}

Filtering

Properties

  • class : string

    The CSS class used on the <mark> element in the view. It should match the color setting.

  • color : string

    The CSS var() used for the highlighter. The color is used in the user interface to represent the highlighter. There is a possibility to use the default color format like rgb, hex or hsl, but you need to care about the color of <mark> by adding CSS classes definition.

  • model : string

    The unique attribute value in the model.

  • title : string

    The user-readable title of the option.

  • type : 'marker' | 'pen'

    The type of highlighter:

    • 'marker' – Uses the color as the background-color style,
    • 'pen' – Uses the color as the font color style.