Typedef

HighlightOption (highlight)

@ckeditor/ckeditor5-highlight/src/highlight

typedef
Object

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.