mavonEditor,基于vue的markdown 编辑器插件
![chat](https://cdn.crazyming.com/pic/2023/11/655356fd0a5bb.png)
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字段来分别存放。
版权声明:
作者:东明兄
链接:https://blog.crazyming.com/note/621/
来源:CrazyMing
文章版权归作者所有,未经允许请勿转载。
![](https://blog.crazyming.com/wp-content/uploads/2023/05/logonew.png)
![chat](https://pic.crazyming.com/i/pic/2023/08/64effaeea7b57.png)
匿名
匿名@匿名
wre![网站主](https://blog.crazyming.com/wp-content/themes/CorePress-Pro/static/img/zhan.svg)