- vue引用富文本
- npm i mavon-editor // yarn add mavon-editor
- 对应文件引入
HTML:
<mavon-editor v-model="formEmp.content" :ishljs="true" :subfield="true" :toolbars="toolbars" ref=md @imgAdd="$imgAdd" />
js:
import { mavonEditor } from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
components: { MDinput },
- mardown 转义HTML
- npm i markdown-it // yarn add markdown-it
- const md = require('markdown-it')()
content.content = md.render(content.content)
this.newsDetailsForm = content
网友评论