|
|
@ -32,7 +32,7 @@ const props = withDefaults( |
|
|
|
|
|
|
|
|
|
|
|
const emits = defineEmits(['update:value', 'focus', 'blur']) |
|
|
|
const emits = defineEmits(['update:value', 'focus', 'blur']) |
|
|
|
|
|
|
|
|
|
|
|
const { isFormField, hiddenBubbleMenuOptions } = toRefs(props) |
|
|
|
const { fullMode, isFormField, hiddenBubbleMenuOptions } = toRefs(props) |
|
|
|
|
|
|
|
|
|
|
|
const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))! |
|
|
|
const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))! |
|
|
|
|
|
|
|
|
|
|
@ -219,16 +219,16 @@ if (isFormField.value) { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
watch(editorDom, () => { |
|
|
|
onMounted(() => { |
|
|
|
if (!editorDom.value) return |
|
|
|
if (fullMode.value) { |
|
|
|
|
|
|
|
|
|
|
|
setEditorContent(vModel.value, true) |
|
|
|
setEditorContent(vModel.value, true) |
|
|
|
|
|
|
|
|
|
|
|
if ((isForm.value && !isSurveyForm.value) || isFormField.value) return |
|
|
|
if ((isForm.value && !isSurveyForm.value) || isFormField.value) return |
|
|
|
// Focus editor after editor is mounted |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
nextTick(() => { |
|
|
|
editor.value?.chain().focus().run() |
|
|
|
editor.value?.chain().focus().run() |
|
|
|
}, 50) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
useEventListener( |
|
|
|
useEventListener( |
|
|
|