markdowncompiler
v0.5.0
Published
markdowncompiler - markdown String to tokens or html.
Downloads
4
Maintainers
Readme
markdowncompiler
用于将markdown解析成tokens,将tokens渲染为html字符串。 方便构建WYSIWYG的markdown编辑器
Install
node.js:
npm install markdowncompiler --save
Usage examples
import MarkdownCompiler from ('markdowncompiler')
const md = new MarkdownCompiler()
tokens = md.markdown2Tokens('# 123\n## 456\n```python\nprint(123)\n```')
html = md.tokens2Html(tokens)