diff --git a/src/components/TextEditor/InsertImage.vue b/src/components/TextEditor/InsertImage.vue index 0ec915eb..8a61be05 100644 --- a/src/components/TextEditor/InsertImage.vue +++ b/src/components/TextEditor/InsertImage.vue @@ -26,10 +26,12 @@ /> @@ -63,6 +65,7 @@ export default { }) }, addImage(src) { + if (!src) return this.editor.chain().focus().setImage({ src }).run() this.reset() }, diff --git a/src/components/TextEditor/InsertVideo.vue b/src/components/TextEditor/InsertVideo.vue index e3bfaea6..f2ed759a 100644 --- a/src/components/TextEditor/InsertVideo.vue +++ b/src/components/TextEditor/InsertVideo.vue @@ -81,6 +81,7 @@ export default { }, addVideo(src) { + if (!src) return this.editor .chain() .focus()