sparksuite / simplemde-markdown-editor

A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://simplemde.com
MIT License
9.8k stars 1.12k forks source link

想问一下能够将md渲染成html,为什么接口不开放呢? #711

Open xuxchao opened 5 years ago

xuxchao commented 5 years ago

想问一下能够将md渲染成html,为什么接口不开放呢?

我通过查资料发现他里面有markdown这个方法能够将md编译成html,希望能够加了文档上。

还有是否能够将必须引入一个textarea的限制去掉呢?

catch6 commented 5 years ago

@mrxu0 这个方法在哪呢兄弟,我也正需要呢,告诉我下

icksky commented 5 years ago

....渲染方法是 marked.js 实现的...

webyuanzheng commented 5 years ago

SimpleMDE.prototype.markdown(content)源码有

couth commented 2 years ago

看了半天,好歹找到方法了。拿走不谢^_^

const mdEditor= new SimpleMDE(); let htmlCode = mdEditor.options.previewRender(mdEditor.value()); console.log(htmlCode);