X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/03073dd9e413d20d385cb4a90cbce420fa5614c1..07b889547d28e68e5fc8f923c166bd607da17ad7:/resources/assets/js/components/markdown-editor.js diff --git a/resources/assets/js/components/markdown-editor.js b/resources/assets/js/components/markdown-editor.js index 96cc1e6d1..b099a7ca9 100644 --- a/resources/assets/js/components/markdown-editor.js +++ b/resources/assets/js/components/markdown-editor.js @@ -64,7 +64,7 @@ class MarkdownEditor { let action = button.getAttribute('data-action'); if (action === 'insertImage') this.actionInsertImage(); if (action === 'insertLink') this.actionShowLinkSelector(); - if (action === 'insertDrawing' && event.ctrlKey) { + if (action === 'insertDrawing' && (event.ctrlKey || event.metaKey)) { this.actionShowImageManager(); return; } @@ -394,9 +394,7 @@ class MarkdownEditor { const drawingId = imgContainer.getAttribute('drawio-diagram'); DrawIO.show(() => { - return window.$http.get(window.baseUrl(`/images/base64/${drawingId}`)).then(resp => { - return `data:image/png;base64,${resp.data.content}`; - }); + return DrawIO.load(drawingId); }, (pngData) => { let data = {