diff --git a/resources/assets/js/components/markdown-editor.js b/resources/assets/js/components/markdown-editor.js index 6eba242d0..dd58a0ece 100644 --- a/resources/assets/js/components/markdown-editor.js +++ b/resources/assets/js/components/markdown-editor.js @@ -304,7 +304,7 @@ class MarkdownEditor { let cursorPos = this.cm.getCursor('from'); window.ImageManager.show(image => { let selectedText = this.cm.getSelection(); - let newText = "![" + (selectedText || image.name) + "](" + image.thumbs.display + ")"; + let newText = "[![" + (selectedText || image.name) + "](" + image.thumbs.display + ")](" + image.url + ")"; this.cm.focus(); this.cm.replaceSelection(newText); this.cm.setCursor(cursorPos.line, cursorPos.ch + newText.length); @@ -427,4 +427,4 @@ class MarkdownEditor { } -export default MarkdownEditor ; \ No newline at end of file +export default MarkdownEditor ;