可以在methods中设置
onCreated(editor) {
this.editor = Object.seal(editor);
this.editor.children.map(item=>{
item.children.map(ele=>{
if(ele.text == ''){//这样粘贴过来的格式不会改变
ele.fontSize='16px'
ele.fontFamily = '仿宋'
}
})
})
},
可以在methods中设置
onCreated(editor) {
this.editor = Object.seal(editor);
this.editor.children.map(item=>{
item.children.map(ele=>{
if(ele.text == ''){//这样粘贴过来的格式不会改变
ele.fontSize='16px'
ele.fontFamily = '仿宋'
}
})
})
},