引用:Vue集成WangEditor的初次使用_3unshine的博客-CSDN博客_vue 集成wangeditor
src/components/index.js
import Vue from 'vue';
import WangEdit from './WangEdit.vue';
Vue.component('hd-edit',WangEdit);
使用方式:
<hd-edit v-model="addInterview.remark" v-bind:content="addInterview.remark" @editorContent="getEditorContent"></hd-edit>
//获取编辑器内容
getEditorContent(data) {
this.editEmailContent = data;
},
WangEditor使用注意:
var editor = new E(this.$refs.editor);
//兼容老版本
let config = editor.customConfig ? editor.customConfig : editor.config;
config.height = 200;//设置高度