diff --git a/docs/src/demos/Nodes/TaskList/index.spec.js b/docs/src/demos/Nodes/TaskList/index.spec.js index 97fb08ace..ac9d6acb2 100644 --- a/docs/src/demos/Nodes/TaskList/index.spec.js +++ b/docs/src/demos/Nodes/TaskList/index.spec.js @@ -63,7 +63,7 @@ context('/demos/Nodes/TaskList', () => { it('should make the paragraph a task list when the keyboard shortcut is pressed', () => { cy.get('.ProseMirror') - .trigger('keydown', { modKey: true, shiftKey: true, key: 'l' }) + .trigger('keydown', { modKey: true, shiftKey: true, key: '9' }) .find('ul li') .should('contain', 'Example Text') }) diff --git a/docs/src/docPages/api/keyboard-shortcuts.md b/docs/src/docPages/api/keyboard-shortcuts.md index 64486a63d..2a69213fa 100644 --- a/docs/src/docPages/api/keyboard-shortcuts.md +++ b/docs/src/docPages/api/keyboard-shortcuts.md @@ -43,12 +43,12 @@ Most of the core extensions register their own keyboard shortcuts. Depending on | Apply heading style 6 | `Control` `Alt` `6` | `Cmd` `Alt` `6` | | Ordered list | `Control` `Shift` `7` | `Cmd` `Shift` `7` | | Bullet list | `Control` `Shift` `8` | `Cmd` `Shift` `8` | +| Task list | `Control` `Shift` `9` | `Cmd` `Shift` `9` | | Blockquote | `Control` `Shift` `B` | `Cmd` `Shift` `B` | | Left align | `Control` `Shift` `L` | `Cmd` `Shift` `L` | | Center align | `Control` `Shift` `E` | `Cmd` `Shift` `E` | | Right align | `Control` `Shift` `R` | `Cmd` `Shift` `R` | | Justify | `Control` `Shift` `J` | `Cmd` `Shift` `J` | -| Task list | `Control` `Shift` `L` | `Cmd` `Shift` `L` (TODO: Conflict!) | | Code block | `Control` `Alt` `C` | `Cmd` `Alt` `C` | diff --git a/docs/src/docPages/api/nodes/task-list.md b/docs/src/docPages/api/nodes/task-list.md index 28f6e0702..d59e8a494 100644 --- a/docs/src/docPages/api/nodes/task-list.md +++ b/docs/src/docPages/api/nodes/task-list.md @@ -28,8 +28,8 @@ This extension requires the [`TaskItem`](/api/nodes/task-item) extension. | taskList | — | Toggle a task list. | ## Keyboard shortcuts -* Windows/Linux: `Control` `Shift` `L` -* macOS: `Cmd` `Shift` `L` +* Windows/Linux: `Control` `Shift` `9` +* macOS: `Cmd` `Shift` `9` ## Source code [packages/extension-task-list/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-task-list/) diff --git a/packages/extension-task-list/src/task-list.ts b/packages/extension-task-list/src/task-list.ts index af4305fc6..2444c221a 100644 --- a/packages/extension-task-list/src/task-list.ts +++ b/packages/extension-task-list/src/task-list.ts @@ -51,7 +51,7 @@ export const TaskList = Node.create({ addKeyboardShortcuts() { return { - 'Mod-Shift-l': () => this.editor.commands.toggleTaskList(), + 'Mod-Shift-9': () => this.editor.commands.toggleTaskList(), } }, })