mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Koenig - Fix error on SHIFT+ENTER whilst a card is selected
refs https://github.com/TryGhost/Ghost/issues/9505 - a card section isn't markerable so a guard is needed to prevent inserting the soft-break atom
This commit is contained in:
parent
2c8a28f77a
commit
d87787c47c
1 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,10 @@ export default function (editor) {
|
|||
str: 'SHIFT+ENTER',
|
||||
|
||||
run(editor) {
|
||||
if (!editor.range.headSection.isMarkerable) {
|
||||
return;
|
||||
}
|
||||
|
||||
editor.run((postEditor) => {
|
||||
let softReturn = postEditor.builder.createAtom('soft-return');
|
||||
postEditor.insertMarkers(editor.range.head, [softReturn]);
|
||||
|
|
Loading…
Add table
Reference in a new issue