npm install mavon-editor --save
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
Vue.use(mavonEditor)
<mavon-editor ref=md @imgAdd="$imgAdd" @imgDel="$imgDel" @change="getHtmlContent" v-model="form.content"></mavon-editor>
github地址:https://github.com/hinesboy/mavonEditor
一些总结:
这次用到mavonEditor这个插件是要做一个新闻发布的功能,新闻的查看与编辑: 新闻的查看 查看的是 html格式的代码片段,新闻编辑,需要编辑markdown 格式,所以在数据库 新闻表中 需要有一个content_html字段和content_markdown字段来分别存放。
1.如需转载本站原创文章,请务必注明文章出处并附上链接,非常感谢。
2.本站用于记录个人 工作、学习、生活,非商业网站,更多信息请 点击这里
😀 😀 ❗ 😛
666
😀 🙄 😉