HighlightConfig (highlight)
@ckeditor/ckeditor5-highlight/src/highlight
The configuration of the highlight feature.
See all editor options.
Filtering
Properties
-
options : Array.<HighlightOption>
The available highlight options. The default value is:
There are two types of highlighters available:
'marker'
– Rendered as a<mark>
element, styled with thebackground-color
.'pen'
– Rendered as a<mark>
element, styled with the fontcolor
.
Note: The highlight feature provides a stylesheet with the CSS classes and corresponding colors defined as CSS variables.
It is possible to define the
color
property directly asrgba(R, G, B, A)
,#RRGGBB[AA]
orhsla(H, S, L, A)
. In such situation, the color will only apply to the UI of the editor and the<mark>
elements in the content must be styled by custom classes provided by a dedicated stylesheet.Note: It is recommended for the
color
property to correspond to the class in the content stylesheet because it represents the highlighter in the user interface of the editor.
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.