|
|
@ -140,9 +140,10 @@ const editor = useEditor({ |
|
|
|
onFocus: () => { |
|
|
|
onFocus: () => { |
|
|
|
isFocused.value = true |
|
|
|
isFocused.value = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
onBlur: () => { |
|
|
|
onBlur: (e) => { |
|
|
|
if (props.isTabPressed) { |
|
|
|
if (props.isTabPressed) { |
|
|
|
isFocused.value = false |
|
|
|
isFocused.value = false |
|
|
|
|
|
|
|
e?.editor?.setEditable(false) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
@ -173,16 +174,6 @@ const setEditorContent = (contentMd: any, focusEndOfDoc?: boolean) => { |
|
|
|
}, 100) |
|
|
|
}, 100) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (props.isFormField) { |
|
|
|
|
|
|
|
watch([props, editor], () => { |
|
|
|
|
|
|
|
if (props.readOnly) { |
|
|
|
|
|
|
|
editor.value?.setEditable(false) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
editor.value?.setEditable(true) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (props.syncValueChange) { |
|
|
|
if (props.syncValueChange) { |
|
|
|
watch([vModel, editor], () => { |
|
|
|
watch([vModel, editor], () => { |
|
|
|
setEditorContent(vModel.value) |
|
|
|
setEditorContent(vModel.value) |
|
|
|