HtmlPageDataProcessor (html-support)
@ckeditor/ckeditor5-html-support/src/htmlpagedataprocessor
The full page HTML data processor class. This data processor implementation uses HTML as input and output data.
Filtering
Methods
-
registerRawContentMatcher( pattern )
module:html-support/htmlpagedataprocessor~HtmlPageDataProcessor#registerRawContentMatcher
Registers a
MatcherPattern
for view elements whose content should be treated as raw data and its content should be converted to a custom property of a view element called"$rawContent"
while converting to view.Parameters
pattern : MatcherPattern
Pattern matching all view elements whose content should be treated as plain text.
-
toData( fragment ) → *
module:html-support/htmlpagedataprocessor~HtmlPageDataProcessor#toData
Converts a document fragment to data.
Parameters
fragment : DocumentFragment
The document fragment to be processed.
Returns
*
-
toView( data ) → DocumentFragment
module:html-support/htmlpagedataprocessor~HtmlPageDataProcessor#toView
-
useFillerType( type )
module:html-support/htmlpagedataprocessor~HtmlPageDataProcessor#useFillerType
If the processor is set to use marked fillers, it will insert
fillers wrapped in<span>
elements (<span data-cke-filler="true"> </span>
) instead of regular
characters.This mode allows for more precise handling of block fillers (so they do not leak into the editor content) but bloats the editor data with additional markup.
This mode may be required by some features and will be turned on by them automatically.
Parameters
type : 'default' | 'marked'
Whether to use the default or marked
block fillers.
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.