refactory-id / bootstrap-markdown

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

Preview working with jQuery #289

Open OssiPesonen opened 7 years ago

OssiPesonen commented 7 years ago

Please move the NOTE section from your instructions to the top of the page, or add it to Github, clearly.

It was a small bump on the road to discover preview button does nothing without those plugins, which need Node.js to work. jQuery does not cut it.

However, using the onPreview callback, you can basically include any JavaScript markdown parser to return working HTML on the preview. I used SimonWaldherr/micromarkdown.js from Github.

onPreview: function (e) { return micromarkdown.parse(e.getContent()); }

Please update the instructions.

toopay commented 7 years ago

@OssiPesonen care to open PR? The doc is on gh-page branch