File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
src/components/TextEditor Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 26
26
/>
27
27
</template >
28
28
<template #actions >
29
- <Button variant =" solid" @click =" addImage(addImageDialog.url)" >
30
- Insert Image
31
- </Button >
32
- <Button @click =" reset" > Cancel </Button >
29
+ <div class =" flex gap-2" >
30
+ <Button variant =" solid" @click =" addImage(addImageDialog.url)" >
31
+ Insert Image
32
+ </Button >
33
+ <Button @click =" reset" > Cancel </Button >
34
+ </div >
33
35
</template >
34
36
</Dialog >
35
37
</template >
@@ -63,6 +65,7 @@ export default {
63
65
})
64
66
},
65
67
addImage (src ) {
68
+ if (! src) return
66
69
this .editor .chain ().focus ().setImage ({ src }).run ()
67
70
this .reset ()
68
71
},
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ export default {
81
81
},
82
82
83
83
addVideo (src ) {
84
+ if (! src) return
84
85
this .editor
85
86
.chain ()
86
87
.focus ()
You can’t perform that action at this time.
0 commit comments