微信扫一扫看面试题

关注面试题库

vue项目中如何使用markdown编辑器插件

1.安装mavon-editor

$ npm install mavon-editor --save

需要使用Markdown编辑器的页面js中:

import { mavonEditor } from ‘mavon-editor’
import ‘mavon-editor/dist/css/index.css’

export default {
components: {
mavonEditor
}
}
html:

<mavonEditor v-model=“content” ref=“md” @imgAdd="$imgAdd" @change=“changeMavon”/>
js:

data(){
return{
content:’’,
configs:{

       }
    }
},
components:{
    mavonEditor
},
methods:{
    changeMavon(){

    },
    $imgAdd(){
        
    }
}
posted @ 2022-07-23 10:04  web前端面试小助手  阅读(642)  评论(0)    收藏  举报