Fix #4158: insert image into correct position.
This commit is contained in:
@ -35,13 +35,15 @@ Oqtane.RichTextEditor = {
|
||||
enableQuillEditor: function (editorElement, mode) {
|
||||
editorElement.__quill.enable(mode);
|
||||
},
|
||||
insertQuillImage: function (quillElement, imageURL, altText) {
|
||||
var Delta = Quill.import('delta');
|
||||
editorIndex = 0;
|
||||
|
||||
getCurrentCursor: function (quillElement) {
|
||||
var editorIndex = 0;
|
||||
if (quillElement.__quill.getSelection() !== null) {
|
||||
editorIndex = quillElement.__quill.getSelection().index;
|
||||
}
|
||||
return editorIndex;
|
||||
},
|
||||
insertQuillImage: function (quillElement, imageURL, altText, editorIndex) {
|
||||
var Delta = Quill.import('delta');
|
||||
|
||||
return quillElement.__quill.updateContents(
|
||||
new Delta()
|
||||
|
Reference in New Issue
Block a user