|
@@ -127,7 +127,8 @@
|
|
|
handleBlur() {
|
|
|
this.editorCtx.getContents({
|
|
|
success: (res) => {
|
|
|
- this.$emit('blur', res.html === '<p><br></p>' ? '' : res.html)
|
|
|
+ const _text = res?.text.replace(/\s+/g, '')
|
|
|
+ this.$emit('blur', _text ? res.html : '')
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -146,10 +147,8 @@
|
|
|
}, 500)
|
|
|
},
|
|
|
setEditorContent(content) {
|
|
|
- console.log('setEditorContent-content1:', content)
|
|
|
if (!content && !this.inputText) return
|
|
|
if (typeof content !== 'string') content = ''
|
|
|
- console.log('setEditorContent-content2:', content)
|
|
|
this.editorCtx.setContents({
|
|
|
html: content
|
|
|
});
|