mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Improved Image keyboard shortcut
Image keyboard shortcut now inserts a new line when on a line with text
This commit is contained in:
parent
cb38bb961a
commit
0dd1e72897
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue