參考代碼
官方文檔
寫法
import E from 'wangeditor'
this.editor = new E(this.$refs.editor);
this.editor.customConfig.onchange = (html) => {
this.editorContent = html;
};
this.editor.create();
this.editor.$textElem.attr('contenteditable', false); //設置不可編輯
this.editor.$textContainerElem.css('height', '100px !important'); //設置高度