Fix incorrect WYSIWYG image insertion position
This commit is contained in:
parent
1b346b1c2b
commit
3e755596c7
|
@ -193,7 +193,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
onMediaSelect(m) {
|
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 New Issue