|
@ -254,6 +254,9 @@ onMounted(() => { |
|
|
if (!props.lineBreak) { |
|
|
if (!props.lineBreak) { |
|
|
content = content?.replace(/[\r\n]/g, ''); |
|
|
content = content?.replace(/[\r\n]/g, ''); |
|
|
} |
|
|
} |
|
|
|
|
|
if (content !== modelValue.value) { |
|
|
|
|
|
fieldMethodsClass.updateValue(content); |
|
|
|
|
|
} |
|
|
//updateModelValue(content); |
|
|
//updateModelValue(content); |
|
|
}), |
|
|
}), |
|
|
], |
|
|
], |
|
@ -270,7 +273,6 @@ onMounted(() => { |
|
|
content = content.replace(/[\r\n]/g, ''); |
|
|
content = content.replace(/[\r\n]/g, ''); |
|
|
} |
|
|
} |
|
|
editorView.dispatch({ changes: { from: 0, to: editorView.state.doc.length, insert: content } }); |
|
|
editorView.dispatch({ changes: { from: 0, to: editorView.state.doc.length, insert: content } }); |
|
|
fieldMethodsClass.updateValue(content); |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
); |
|
|
); |
|
@ -288,8 +290,8 @@ const focus = () => { |
|
|
const blur = () => { |
|
|
const blur = () => { |
|
|
isFocus = false; |
|
|
isFocus = false; |
|
|
let content = editorView.state.doc.toString(); |
|
|
let content = editorView.state.doc.toString(); |
|
|
if (Tools.isUndefinedOrNull(content)) { |
|
|
if (Tools.isUndefinedOrNull(content) || content === modelValue.value) { |
|
|
modelValue.value = ''; |
|
|
return; |
|
|
} |
|
|
} |
|
|
const reg = /\$\{(.+?)\}\.\$\{(.+?)\}/g; |
|
|
const reg = /\$\{(.+?)\}\.\$\{(.+?)\}/g; |
|
|
while (reg.test(content)) { |
|
|
while (reg.test(content)) { |
|
|