Fix incorrect WYSIWYG image insertion position
This commit is contained in:
parent
1b346b1c2b
commit
3e755596c7
1 changed files with 5 additions and 1 deletions
|
@ -193,7 +193,11 @@ export default {
|
|||
},
|
||||
|
||||
onMediaSelect(m) {
|
||||
this.$refs.quill.quill.insertEmbed(10, 'image', m.url);
|
||||
const sel = this.$refs.quill.quill.getSelection();
|
||||
if (!sel) {
|
||||
return;
|
||||
}
|
||||
this.$refs.quill.quill.insertEmbed(sel.index, 'image', m.url);
|
||||
},
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue