Fix insert image

This commit is contained in:
Diego Najar 2018-05-16 19:42:40 +02:00
parent 84de0a99a3
commit 226ff3ce70
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ var quill;
// Function required for Media Manager to insert a file on the editor // Function required for Media Manager to insert a file on the editor
function editorInsertMedia(filename) { function editorInsertMedia(filename) {
var Delta = Quill.import("delta"); var Delta = Quill.import("delta");
quill.focus();
quill.updateContents(new Delta() quill.updateContents(new Delta()
.retain(quill.getSelection().index) .retain(quill.getSelection().index)
.insert('<img alt="'+filename+'" src="'+DOMAIN_UPLOADS+filename+'" />') .insert('<img alt="'+filename+'" src="'+DOMAIN_UPLOADS+filename+'" />')