fix(components): use correct SetContentOptions in TipTap.vue

- Replace false with {emitUpdate: false} in setContent calls
- Fix 3 SetContentOptions type errors
This commit is contained in:
kolaente 2025-11-22 16:24:26 +01:00
parent eab1a211ae
commit bff5ed6403
1 changed files with 5 additions and 5 deletions

View File

@ -584,7 +584,7 @@ function bubbleSave() {
}
function exitEditMode() {
editor.value?.commands.setContent(lastSavedState, false)
editor.value?.commands.setContent(lastSavedState, {emitUpdate: false})
if (isEditing.value) {
internalMode.value = 'preview'
}
@ -630,9 +630,9 @@ function uploadAndInsertFiles(files: File[] | FileList) {
})
const html = editor.value?.getHTML().replace(UPLOAD_PLACEHOLDER_ELEMENT, '') ?? ''
editor.value?.commands.setContent(html, false)
editor.value?.commands.setContent(html, {emitUpdate: false})
bubbleNow()
})
}
@ -690,7 +690,7 @@ onBeforeUnmount(() => {
function setModeAndValue(value: string) {
internalMode.value = isEditorContentEmpty(value) ? 'edit' : 'preview'
editor.value?.commands.setContent(value, false)
editor.value?.commands.setContent(value, {emitUpdate: false})
}