We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd8b3be commit d6902f3Copy full SHA for d6902f3
packages/core/src/extensions/Blocks/nodes/BlockContent/TableBlockContent/TableExtension.ts
@@ -1,4 +1,4 @@
1
-import { Extension, callOrReturn, getExtensionField } from "@tiptap/core";
+import { callOrReturn, Extension, getExtensionField } from "@tiptap/core";
2
import { columnResizing, tableEditing } from "prosemirror-tables";
3
4
export const TableExtension = Extension.create({
@@ -15,6 +15,11 @@ export const TableExtension = Extension.create({
15
16
addKeyboardShortcuts() {
17
return {
18
+ // Makes enter create a new line within the cell.
19
+ Enter: () => {
20
+ this.editor.commands.setHardBreak();
21
+ return true;
22
+ },
23
// Ensures that backspace won't delete the table if the text cursor is at
24
// the start of a cell and the selection is empty.
25
Backspace: () => {
0 commit comments