Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function Markdown(editor) {
editor.data.processor = new GFMDataProcessor();
// Override `toData` to store data as HTML instead of Markdown
// Ref: https://github.com/ckeditor/ckeditor5-markdown-gfm/blob/6fb1654dea22ec0f6eb9ae440fb6737b2a77715b/src/gfmdataprocessor.js#L60
editor.data.processor.toData = function toData(viewFragment) {
const html = this._htmlDP.toData(viewFragment);
return html;
}
}
function Markdown (editor) {
editor.data.processor = new GFMDataProcessor(editor.editing.view.document)
}
function Markdown( editor ) {
editor.data.processor = new GFMDataProcessor();
}