mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-08-05 21:19:46 +08:00
fix conflicting keyboard shortcut for the task list
This commit is contained in:
parent
59b031c27c
commit
a5f28e421e
@ -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')
|
||||
})
|
||||
|
@ -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` |
|
||||
|
||||
<!--| Toggle task| `Control` `Enter` | `Cmd` `Enter` | -->
|
||||
|
@ -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/)
|
||||
|
@ -51,7 +51,7 @@ export const TaskList = Node.create<TaskListOptions>({
|
||||
|
||||
addKeyboardShortcuts() {
|
||||
return {
|
||||
'Mod-Shift-l': () => this.editor.commands.toggleTaskList(),
|
||||
'Mod-Shift-9': () => this.editor.commands.toggleTaskList(),
|
||||
}
|
||||
},
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user