fix: Allow delete table row and column with mod+backspace

This commit is contained in:
Tom Moor
2024-06-04 21:59:22 -04:00
parent dd4c8c5546
commit 7a32271992
3 changed files with 43 additions and 1 deletions

View File

@@ -19,6 +19,8 @@ import {
createTable,
sortTable,
setTableAttr,
deleteColSelection,
deleteRowSelection,
} from "../commands/table";
import { MarkdownSerializerState } from "../lib/markdown/serializer";
import tablesRule from "../rules/tables";
@@ -86,6 +88,10 @@ export default class Table extends Node {
Tab: chainCommands(goToNextCell(1), addRowAndMoveSelection()),
"Shift-Tab": goToNextCell(-1),
"Mod-Enter": addRowAndMoveSelection(),
"Mod-Backspace": chainCommands(
deleteColSelection(),
deleteRowSelection()
),
};
}