mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-10 13:43:38 +08:00
Merge branch 'master' of git://github.com/thomasjsn/BookStack into thomasjsn-master
This commit is contained in:
@ -304,7 +304,7 @@ class MarkdownEditor {
|
|||||||
let cursorPos = this.cm.getCursor('from');
|
let cursorPos = this.cm.getCursor('from');
|
||||||
window.ImageManager.show(image => {
|
window.ImageManager.show(image => {
|
||||||
let selectedText = this.cm.getSelection();
|
let selectedText = this.cm.getSelection();
|
||||||
let newText = "";
|
let newText = "[](" + image.url + ")";
|
||||||
this.cm.focus();
|
this.cm.focus();
|
||||||
this.cm.replaceSelection(newText);
|
this.cm.replaceSelection(newText);
|
||||||
this.cm.setCursor(cursorPos.line, cursorPos.ch + newText.length);
|
this.cm.setCursor(cursorPos.line, cursorPos.ch + newText.length);
|
||||||
@ -427,4 +427,4 @@ class MarkdownEditor {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MarkdownEditor ;
|
export default MarkdownEditor ;
|
||||||
|
Reference in New Issue
Block a user