fix(editor): prevent image insertion from triggering save (#1846)

Ensure inserting an image only updates editor content without firing implicit save or switching out of edit mode. This keeps user in edit flow and avoids unintended save events.
This commit is contained in:
Weijie Zhao 2025-11-21 22:22:46 +08:00 committed by GitHub
parent b78ab5d45a
commit b3b420121d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -632,7 +632,7 @@ function uploadAndInsertFiles(files: File[] | FileList) {
editor.value?.commands.setContent(html, false)
bubbleSave()
bubbleNow()
})
}
@ -663,7 +663,7 @@ async function addImage(event) {
if (url) {
editor.value?.chain().focus().setImage({src: url}).run()
bubbleSave()
bubbleNow()
}
}