mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Merge pull request #925 from matthojo/New-line
Added new paragraph keyboard shortcut
This commit is contained in:
commit
f5d617d8d4
3 changed files with 15 additions and 1 deletions
|
@ -116,6 +116,13 @@
|
|||
this.elem.replaceSelection(md, 'end');
|
||||
pass = false;
|
||||
break;
|
||||
case 'newLine':
|
||||
cursor = this.elem.getCursor();
|
||||
if (this.elem.getLine(cursor.line) !== "") {
|
||||
this.elem.setLine(cursor.line, this.elem.getLine(cursor.line) + "\n\n");
|
||||
}
|
||||
pass = false;
|
||||
break;
|
||||
default:
|
||||
if (this.options.syntax[this.style]) {
|
||||
md = this.options.syntax[this.style].replace('$1', text);
|
||||
|
|
|
@ -83,6 +83,11 @@
|
|||
<td></td>
|
||||
<td>Ctrl + Alt + W</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>New Paragraph</td>
|
||||
<td></td>
|
||||
<td>Ctrl / Cmd + Enter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Uppercase</td>
|
||||
<td></td>
|
||||
|
|
|
@ -33,7 +33,9 @@
|
|||
{'key': 'Ctrl+Alt+W', 'style': 'selectword'},
|
||||
{'key': 'Ctrl+L', 'style': 'list'},
|
||||
{'key': 'Ctrl+Alt+C', 'style': 'copyHTML'},
|
||||
{'key': 'Meta+Alt+C', 'style': 'copyHTML'}
|
||||
{'key': 'Meta+Alt+C', 'style': 'copyHTML'},
|
||||
{'key': 'Meta+Enter', 'style': 'newLine'},
|
||||
{'key': 'Ctrl+Enter', 'style': 'newLine'}
|
||||
],
|
||||
imageMarkdownRegex = /^(?:\{<(.*?)>\})?!(?:\[([^\n\]]*)\])(?:\(([^\n\]]*)\))?$/gim,
|
||||
markerRegex = /\{<([\w\W]*?)>\}/;
|
||||
|
|
Loading…
Reference in a new issue