perfect-markdown
perfect-markdown is a markdown editor based on Vue & markdown-it. The core is inspired by the implementation of mavonEditor, so perfect-markdown has almost all of the functions of mavonEditor. What's more, perfect-markdown also extends some features based on mavonEditor.
Install perfect-markdown
$ npm install perfect-markdown --save
Usage
main.js
:
editor.vue
webpack.base.conf.js
API
props
name | type | default | describe |
---|---|---|---|
value | String | '' | textarea value |
showToolbar | Boolean | true | show toolbar |
showTextarea | Boolean | true | show the textarea |
uploadImgFn | Function | funtion | uploadImg |
uploadFileFn | Function | funtion | uploadFile |
plugins | Object | {} | katex or mathjax plugin, { katex: true } or { mathjax: true }. (mathjax is more powerful than katex, but it rendering efficiency is lower) |
customLeftToolbar | Boolean | false | |
customRightToolbar | Boolean | false | |
imgWidthHeightAttr | Object | {width: false, height: false} | this is default output [name](url), and all true will output [name =WxH](url) |
... | ... | ... | .... |