Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this context is wrong when using MarkdownDeep.js parser #374

Open
kspearrin opened this issue Sep 12, 2015 · 0 comments
Open

this context is wrong when using MarkdownDeep.js parser #374

kspearrin opened this issue Sep 12, 2015 · 0 comments

Comments

@kspearrin
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant