diff --git a/docs/src/demos/Examples/Basic/index.vue b/docs/src/demos/Examples/Basic/index.vue index 1de6d03c0..292a7cbab 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 3d762d80e..ca8e5e09b 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 08c3f4527..5ae438268 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 ea2bee881..644599209 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 677b09416..22a24e81b 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(), } }, })