add hardbreak commands

This commit is contained in:
Philipp Kühn
2020-11-18 12:11:45 +01:00
parent fbee7656c8
commit bf08653bba
5 changed files with 7 additions and 7 deletions

View File

@@ -25,7 +25,7 @@ const HardBreak = Node.create({
/**
* Add a hard break
*/
hardBreak: (): Command => ({ commands, state, dispatch }) => {
setHardBreak: (): Command => ({ commands, state, dispatch }) => {
return commands.try([
() => exitCode(state, dispatch),
() => {
@@ -42,8 +42,8 @@ const HardBreak = Node.create({
addKeyboardShortcuts() {
return {
'Mod-Enter': () => this.editor.commands.hardBreak(),
'Shift-Enter': () => this.editor.commands.hardBreak(),
'Mod-Enter': () => this.editor.commands.setHardBreak(),
'Shift-Enter': () => this.editor.commands.setHardBreak(),
}
},
})