Skip to content

Commit 0324855

Browse files
committed
return result from keymap handlers
1 parent 52a9bbd commit 0324855

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • packages/super-editor/src/core/extensions

packages/super-editor/src/core/extensions/keymap.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { isIOS } from '../utilities/isIOS.js';
33
import { isMacOS } from '../utilities/isMacOS.js';
44

55
export const handleEnter = (editor) => {
6-
editor.commands.first(({ commands }) => [
6+
return editor.commands.first(({ commands }) => [
77
() => commands.newlineInCode(),
88
() => commands.createParagraphNear(),
99
() => commands.liftEmptyBlock(),
@@ -12,7 +12,7 @@ export const handleEnter = (editor) => {
1212
};
1313

1414
export const handleBackspace = (editor) => {
15-
editor.commands.first(({ commands, tr }) => [
15+
return editor.commands.first(({ commands, tr }) => [
1616
() => commands.undoInputRule(),
1717
() => {
1818
tr.setMeta('inputType', 'deleteContentBackward');
@@ -25,7 +25,7 @@ export const handleBackspace = (editor) => {
2525
};
2626

2727
export const handleDelete = (editor) => {
28-
editor.commands.first(({ commands }) => [
28+
return editor.commands.first(({ commands }) => [
2929
() => commands.deleteSelection(),
3030
() => commands.joinForward(),
3131
() => commands.selectNodeForward(),

0 commit comments

Comments
 (0)