EpicEditor is an embeddable JavaScript Markdown editor with split fullscreen editing, live previewing, automatic draft saving, offline support, and more. For developers, it offers a robust API, can be easily themed, and allows you to swap out the bundled Markdown parser with anything you throw at it.
I don't think that this is an EpicEditor issue directly, but I am looking for a possible workaround.
I am trying to use EpicEditor with MarkdownDeep.js (I am using MarkdownDeep on the server-side so I need the parsers to match) as the parser like so:
var markdown = new MarkdownDeep.Markdown();
var editorOptions = {
parser: markdown.Transform
}
var editor = new EpicEditor(editorOptions).load();
When EpicEditor invokes the markdown.Transform function, this inside the markdown.Transform function is the context of the EpicEditor, not MarkdownDeep.Markdown resulting in the following error on line 145 of MarkdownDeep.js:
Uncaught TypeError: this.ProcessBlocks is not a function
I don't think that this is an EpicEditor issue directly, but I am looking for a possible workaround.
I am trying to use EpicEditor with MarkdownDeep.js (I am using MarkdownDeep on the server-side so I need the parsers to match) as the parser like so:
When EpicEditor invokes the
markdown.Transform
function,this
inside themarkdown.Transform
function is the context of the EpicEditor, notMarkdownDeep.Markdown
resulting in the following error on line 145 of MarkdownDeep.js:See the following JSFiddle for an example: https://jsfiddle.net/1saet37v/
Is there something I can do to fix this easily?
ref: http://www.toptensoftware.com/markdowndeep/api