refactory-id / bootstrap-markdown

Bootstrap plugin for markdown editing
Apache License 2.0
1.99k stars 370 forks source link

Unable to use option for markdown parser (Support any markdown parser via option (#167)) #261

Open ChrisGPen opened 8 years ago

ChrisGPen commented 8 years ago

I want to use markdown-it as the parser. I have confirmed markdown-it is loaded via script. There is a mention of documentation for this functionality in the pull request, but I cannot find it. Can you tell me what is wrong with the example I am using, or where further documentation is?

I have tried to use the following example given (in #167) as below:

var md = markdownit();

$('[data-provide="markdown-editor"][data-preview]').markdown({ parser: md.render.bind(md), onChange: function (e) { var $preview = $(e.$textarea.data('preview')); $preview.html(e.parseContent()); } });

I do not get any errors, but bootstrap markdown behaves like it has no parser (preview has no formatting).

Thanks for your assistance...