GFMDataProcessor (markdown-gfm)
@ckeditor/ckeditor5-markdown-gfm/src/gfmdataprocessor
This data processor implementation uses GitHub Flavored Markdown as input/output data.
See the Markdown output guide to learn more on how to enable it.
Filtering
Properties
-
_htmlDP : HtmlDataProcessor
private
HTML data processor used to process HTML produced by the Markdown-to-HTML converter and the other way.
Methods
-
constructor( document )
Creates a new instance of the Markdown data processor class.
Parameters
document : Document
-
keepHtml( element )
Keeps the specified element in the output as HTML. This is useful if the editor contains features that produce HTML that are not part of the markdon standards.
By default, all HTML tags are removed.
Parameters
element : String
The element name to be kept.
-
registerRawContentMatcher( pattern )
Registers a
MatcherPattern
for view elements whose content should be treated as a raw data and not processed during conversion from Markdown to view elements.The raw data can be later accessed by view element custom property
"$rawContent"
.Parameters
pattern : MatcherPattern
Pattern matching all view elements whose content should be treated as a raw data.
-
toData( viewFragment ) → String
Converts the provided
DocumentFragment
to data format — in this case to a Markdown string. -
toView( data ) → DocumentFragment
Converts the provided Markdown string to view tree.