mavonEditor,基于vue的markdown 编辑器插件

东明兄 2018-10-15
3条评论 3,362 次浏览
东明兄 2018-10-153条评论 3,362 次浏览
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字段来分别存放。

mavonEditor,基于vue的markdown 编辑器插件” 有 3 条评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注