[update 富文本编辑器] 部分按钮失效

This commit is contained in:
danshihao
2024-09-20 12:03:48 +08:00
parent c5f905802c
commit ecad1d7e45
+2 -2
View File
@@ -93,7 +93,7 @@ export default {
UE.getEditor(this.id).ready(() => {
console.log('aaa', UE.getEditor(this.id))
// 火狐浏览器格式刷会有问题,让页面失去焦点解决该问题
UE.getEditor(this.id).body.addEventListener('blur', this.editorBlur)
this.$refs.editorBoxRef.querySelector('.edui-for-formatmatch').addEventListener('click', this.editorBlur)
if (_this.fontfamily !== '') {
UE.getEditor(this.id).execCommand('fontfamily', _this.fontfamily)
}
@@ -109,7 +109,7 @@ export default {
})
},
beforeDestroy () {
UE.getEditor(this.id).body.removeEventListener('blur', this.editorBlur)
this.$refs.editorBoxRef.querySelector('.edui-for-formatmatch').removeEventListener('blur', this.editorBlur)
},
destoryed () {
this.editor.destory()