X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/40ca50e44f3ca0f648d915dc73ff205309730f07..refs/pull/3179/head:/resources/js/components/wysiwyg-editor.js
diff --git a/resources/js/components/wysiwyg-editor.js b/resources/js/components/wysiwyg-editor.js
index bde73f4bf..7a2b6ceba 100644
--- a/resources/js/components/wysiwyg-editor.js
+++ b/resources/js/components/wysiwyg-editor.js
@@ -563,8 +563,9 @@ class WysiwygEditor {
}
// Replace the actively selected content with the linked image
+ const imageUrl = image.thumbs.display || image.url;
let html = ``;
- html += `
`;
+ html += `
`;
html += '';
win.tinyMCE.activeEditor.execCommand('mceInsertContent', false, html);
}, 'gallery');
@@ -723,8 +724,9 @@ class WysiwygEditor {
tooltip: 'Insert an image',
onclick: function () {
window.ImageManager.show(function (image) {
+ const imageUrl = image.thumbs.display || image.url;
let html = ``;
- html += `
`;
+ html += `
`;
html += '';
editor.execCommand('mceInsertContent', false, html);
}, 'gallery');