mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
Merge pull request #768 from matthojo/Image-Keyboard-Shortcut
Improved Image keyboard shortcut
This commit is contained in:
commit
2c6dd77b1d
@ -67,7 +67,11 @@
|
||||
pass = false;
|
||||
break;
|
||||
case "image":
|
||||
cursor = this.elem.getCursor();
|
||||
md = this.options.syntax.image.replace('$1', text);
|
||||
if (this.elem.getLine(cursor.line) !== "") {
|
||||
md = "\n\n" + md;
|
||||
}
|
||||
this.elem.replaceSelection(md, "end");
|
||||
cursor = this.elem.getCursor();
|
||||
this.elem.setSelection({line: cursor.line, ch: cursor.ch - 8}, {line: cursor.line, ch: cursor.ch - 1});
|
||||
|
Loading…
Reference in New Issue
Block a user