安裝:
npm install -d mavon-editor -s
引入(在用到它的頁面引入就行):
import {mavonEditor} from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
使用:
<mavon-editor v-model="content" @change="change"></mavon-editor>
components: {
mavonEditor
},
methods: {
change(value, html) {
console.log(value, html)
}
}
效果:
image.png