- 注意 z-index(不要设置为负数),特别是当存在对话框当时候;(https://github.com/wangfupeng1988/wangEditor/issues/1135);
- 关于表格样式(默认边框为 0)可以参看:https://www.kancloud.cn/wangfupeng/wangeditor3/335775;
- 也可以直接修改源码:
- 使用 vue 的话(https://www.jianshu.com/p/52852d39f869):
- 注意编辑框初始化放在 mounted 中;
- 在 editor 创建后,可以将 editor 复制给 data 中的一个数据,这样在 vue 中也可以获取 editor;
- 获取编辑框的数据使用事件:
editor.customConfig.onchange = html => {
this.editorContent = html;
};
editor.create();
- 回显数据到编辑框中可以在编辑框 create 后设置值:
editor.create();
if (this.threadSave.content){
this.editorContent = this.threadSave.content;
editor.txt.html(this.threadSave.content);
}