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
-
HTML data processor used to process HTML produced by the Markdown-to-HTML converter and the other way.
Methods
-
constructor( document )
module:markdown-gfm/gfmdataprocessor~GFMDataProcessor#constructor
-
keepHtml( element )
module:markdown-gfm/gfmdataprocessor~GFMDataProcessor#keepHtml
Keeps the specified element in the output as HTML. This is useful if the editor contains features producing HTML that is not a part of the Markdown standard.
By default, all HTML tags are removed.
Parameters
element : String
The element name to be kept.
-
registerRawContentMatcher( pattern )
module:markdown-gfm/gfmdataprocessor~GFMDataProcessor#registerRawContentMatcher
Registers a
MatcherPattern
for view elements whose content should be treated as raw data and not processed during the conversion from Markdown to view elements.The raw data can be later accessed by a custom property of a view element called
"$rawContent"
.Parameters
pattern : MatcherPattern
The pattern matching all view elements whose content should be treated as raw data.
-
toData( viewFragment ) → String
module:markdown-gfm/gfmdataprocessor~GFMDataProcessor#toData
Converts the provided
DocumentFragment
to data format — in this case to a Markdown string.Parameters
viewFragment : DocumentFragment
Returns
String
Markdown string.
-
toView( data ) → DocumentFragment
module:markdown-gfm/gfmdataprocessor~GFMDataProcessor#toView
Converts the provided Markdown string to a view tree.
Parameters
data : String
A Markdown string.
Returns
DocumentFragment
The converted view element.
-
useFillerType()
module:markdown-gfm/gfmdataprocessor~GFMDataProcessor#useFillerType
This method does not have any effect on the data processor result. It exists for compatibility with the
DataProcessor
interface.
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.