Skip to content

Type Editor


Type Editor / @type-editor/tables / input/handle-key-down

input/handle-key-down

Variables

VariableDescription

handleKeyDown

Keydown handler for table-related keyboard shortcuts.

Handles the following key bindings:

  • Arrow keys: Navigate between cells.
  • Shift+Arrow keys: Extend cell selection.
  • Backspace/Delete: Delete selected cells' content.

Example

typescript
// Use in a ProseMirror plugin
new Plugin({
  props: {
    handleKeyDown: handleKeyDown,
  },
});