diff --git a/docs/src/demos/Examples/Basic/index.vue b/docs/src/demos/Examples/Basic/index.vue index 1de6d03c..292a7cba 100644 --- a/docs/src/demos/Examples/Basic/index.vue +++ b/docs/src/demos/Examples/Basic/index.vue @@ -55,7 +55,7 @@ horizontal rule - + hard break diff --git a/docs/src/demos/Examples/CollaborativeEditing/index.vue b/docs/src/demos/Examples/CollaborativeEditing/index.vue index 3d762d80..ca8e5e09 100644 --- a/docs/src/demos/Examples/CollaborativeEditing/index.vue +++ b/docs/src/demos/Examples/CollaborativeEditing/index.vue @@ -55,7 +55,7 @@ horizontal rule - + hard break diff --git a/docs/src/demos/Examples/CollaborativeEditingWs/index.vue b/docs/src/demos/Examples/CollaborativeEditingWs/index.vue index 08c3f452..5ae43826 100644 --- a/docs/src/demos/Examples/CollaborativeEditingWs/index.vue +++ b/docs/src/demos/Examples/CollaborativeEditingWs/index.vue @@ -55,7 +55,7 @@ horizontal rule - + hard break diff --git a/docs/src/demos/Nodes/HardBreak/index.vue b/docs/src/demos/Nodes/HardBreak/index.vue index ea2bee88..64459920 100644 --- a/docs/src/demos/Nodes/HardBreak/index.vue +++ b/docs/src/demos/Nodes/HardBreak/index.vue @@ -1,6 +1,6 @@ - + hardBreak diff --git a/packages/extension-hard-break/src/index.ts b/packages/extension-hard-break/src/index.ts index 677b0941..22a24e81 100644 --- a/packages/extension-hard-break/src/index.ts +++ b/packages/extension-hard-break/src/index.ts @@ -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(), } }, })