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:
parent
eab1a211ae
commit
bff5ed6403
|
|
@ -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})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue