docs: make all node keyboard shortcuts a table

This commit is contained in:
Hans Pagel 2021-10-01 22:57:27 +02:00
parent 6863626a7a
commit a89e2eed29
14 changed files with 44 additions and 30 deletions

View File

@ -13,7 +13,7 @@ Funfact: We built a [keyboard shortcut learning app](https://mouseless.app), to
Most of the core extensions register their own keyboard shortcuts. Depending on what set of extension you use, not all of the below listed keyboard shortcuts work for your editor. Most of the core extensions register their own keyboard shortcuts. Depending on what set of extension you use, not all of the below listed keyboard shortcuts work for your editor.
### Essentials ### Essentials
| Action | Windows/Linux | macOS | | Command | Windows/Linux | macOS |
| ------------------------ | ------------------------------- | --------------------------- | | ------------------------ | ------------------------------- | --------------------------- |
| Copy | `Control` `C` | `Cmd` `C` | | Copy | `Control` `C` | `Cmd` `C` |
| Cut | `Control` `X` | `Cmd` `X` | | Cut | `Control` `X` | `Cmd` `X` |
@ -24,7 +24,7 @@ Most of the core extensions register their own keyboard shortcuts. Depending on
| Add a line break | `Shift` `Enter` | `Shift` `Enter` | | Add a line break | `Shift` `Enter` | `Shift` `Enter` |
### Text Formatting ### Text Formatting
| Action | Windows/Linux | macOS | | Command | Windows/Linux | macOS |
| ------------- | ------------------------------- | --------------------------- | | ------------- | ------------------------------- | --------------------------- |
| Bold | `Control` `B` | `Cmd` `B` | | Bold | `Control` `B` | `Cmd` `B` |
| Italicize | `Control` `I` | `Cmd` `I` | | Italicize | `Control` `I` | `Cmd` `I` |
@ -34,7 +34,7 @@ Most of the core extensions register their own keyboard shortcuts. Depending on
| Code | `Control` `E` | `Cmd` `E` | | Code | `Control` `E` | `Cmd` `E` |
### Paragraph Formatting ### Paragraph Formatting
| Action | Windows/Linux | macOS | | Command | Windows/Linux | macOS |
| ----------------------- | ------------------------------- | --------------------------- | | ----------------------- | ------------------------------- | --------------------------- |
| Apply normal text style | `Control` `Alt` `0` | `Cmd` `Alt` `0` | | Apply normal text style | `Control` `Alt` `0` | `Cmd` `Alt` `0` |
| Apply heading style 1 | `Control` `Alt` `1` | `Cmd` `Alt` `1` | | Apply heading style 1 | `Control` `Alt` `1` | `Cmd` `Alt` `1` |
@ -58,7 +58,7 @@ Most of the core extensions register their own keyboard shortcuts. Depending on
<!--| Toggle task| `Control`&nbsp;`Enter` | `Cmd`&nbsp;`Enter` | --> <!--| Toggle task| `Control`&nbsp;`Enter` | `Cmd`&nbsp;`Enter` | -->
### Text Selection ### Text Selection
| Action | Windows/Linux | macOS | | Command | Windows/Linux | macOS |
| ------------------------------------------------- | ------------------------------- | --------------------------- | | ------------------------------------------------- | ------------------------------- | --------------------------- |
| Select all | `Control`&nbsp;`A` | `Cmd`&nbsp;`A` | | Select all | `Control`&nbsp;`A` | `Cmd`&nbsp;`A` |
| Extend selection one character to left | `Shift`&nbsp;`←` | `Shift`&nbsp;`←` | | Extend selection one character to left | `Shift`&nbsp;`←` | `Shift`&nbsp;`←` |

View File

@ -51,7 +51,7 @@ editor.commands.unsetBlockquote()
``` ```
## Keyboard shortcuts ## Keyboard shortcuts
| Action | Windows/Linux | macOS | | Command | Windows/Linux | macOS |
| ----------------- | ------------------------------- | --------------------------- | | ----------------- | ------------------------------- | --------------------------- |
| Toggle Blockquote | `Control`&nbsp;`Shift`&nbsp;`B` | `Cmd`&nbsp;`Shift`&nbsp;`B` | | Toggle Blockquote | `Control`&nbsp;`Shift`&nbsp;`B` | `Cmd`&nbsp;`Shift`&nbsp;`B` |

View File

@ -28,8 +28,9 @@ This extension requires the [`ListItem`](/api/nodes/list-item) node.
| bulletList | — | Toggle a bullet list. | | bulletList | — | Toggle a bullet list. |
## Keyboard shortcuts ## Keyboard shortcuts
* Windows/Linux: `Control`&nbsp;`Shift`&nbsp;`8` | Command | Windows/Linux | macOS |
* macOS: `Cmd`&nbsp;`Shift`&nbsp;`8` | ---------------- | ------------------------------- | --------------------------- |
| toggleBulletList | `Control`&nbsp;`Shift`&nbsp;`8` | `Cmd`&nbsp;`Shift`&nbsp;`8` |
## Source code ## Source code
[packages/extension-bullet-list/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-bullet-list/) [packages/extension-bullet-list/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-bullet-list/)

View File

@ -27,8 +27,9 @@ yarn add @tiptap/extension-code-block-lowlight
| codeBlock | — | Wrap content in a code block. | | codeBlock | — | Wrap content in a code block. |
## Keyboard shortcuts ## Keyboard shortcuts
* Windows/Linux: `Control`&nbsp;`Alt`&nbsp;`C` | Command | Windows/Linux | macOS |
* macOS: `Cmd`&nbsp;`Alt`&nbsp;`C` | --------------- | ----------------------------- | ------------------------- |
| toggleCodeBlock | `Control`&nbsp;`Alt`&nbsp;`C` | `Cmd`&nbsp;`Alt`&nbsp;`C` |
## Source code ## Source code
[packages/extension-code-block-lowlight/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-code-block-lowlight/) [packages/extension-code-block-lowlight/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-code-block-lowlight/)

View File

@ -31,8 +31,9 @@ yarn add @tiptap/extension-code-block
| codeBlock | — | Wrap content in a code block. | | codeBlock | — | Wrap content in a code block. |
## Keyboard shortcuts ## Keyboard shortcuts
* Windows/Linux: `Control`&nbsp;`Alt`&nbsp;`C` | Command | Windows/Linux | macOS |
* macOS: `Cmd`&nbsp;`Alt`&nbsp;`C` | --------------- | ----------------------------- | ------------------------- |
| toggleCodeBlock | `Control`&nbsp;`Alt`&nbsp;`C` | `Cmd`&nbsp;`Alt`&nbsp;`C` |
## Source code ## Source code
[packages/extension-code-block/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-code-block/) [packages/extension-code-block/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-code-block/)

View File

@ -25,9 +25,9 @@ yarn add @tiptap/extension-hard-break
| setHardBreak | — | Add a line break. | | setHardBreak | — | Add a line break. |
## Keyboard shortcuts ## Keyboard shortcuts
* `Shift`&nbsp;`Enter` | Command | Windows/Linux | macOS |
* Windows/Linux: `Control`&nbsp;`Enter` | ------------ | ---------------------------------------------- | ------------------------------------------ |
* macOS: `Cmd`&nbsp;`Enter` | setHardBreak | `Shift`&nbsp;`Enter`<br>`Control`&nbsp;`Enter` | `Shift`&nbsp;`Enter`<br>`Cmd`&nbsp;`Enter` |
## Source code ## Source code
[packages/extension-hard-break/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-hard-break/) [packages/extension-hard-break/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-hard-break/)

View File

@ -27,8 +27,14 @@ yarn add @tiptap/extension-heading
| heading | level | Creates a heading node with the specified level. | | heading | level | Creates a heading node with the specified level. |
## Keyboard shortcuts ## Keyboard shortcuts
* Windows/Linux: `Control`&nbsp;`Alt`&nbsp;`1-6` | Command | Windows/Linux | macOS |
* macOS: `Cmd`&nbsp;`Alt`&nbsp;`1-6` | --------------------------- | ----------------------------- | ------------------------- |
| toggleHeading({ level: 1 }) | `Control`&nbsp;`Alt`&nbsp;`1` | `Cmd`&nbsp;`Alt`&nbsp;`1` |
| toggleHeading({ level: 2 }) | `Control`&nbsp;`Alt`&nbsp;`2` | `Cmd`&nbsp;`Alt`&nbsp;`2` |
| toggleHeading({ level: 3 }) | `Control`&nbsp;`Alt`&nbsp;`3` | `Cmd`&nbsp;`Alt`&nbsp;`3` |
| toggleHeading({ level: 4 }) | `Control`&nbsp;`Alt`&nbsp;`4` | `Cmd`&nbsp;`Alt`&nbsp;`4` |
| toggleHeading({ level: 5 }) | `Control`&nbsp;`Alt`&nbsp;`5` | `Cmd`&nbsp;`Alt`&nbsp;`5` |
| toggleHeading({ level: 6 }) | `Control`&nbsp;`Alt`&nbsp;`6` | `Cmd`&nbsp;`Alt`&nbsp;`6` |
## Source code ## Source code
[packages/extension-heading/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-heading/) [packages/extension-heading/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-heading/)

View File

@ -25,9 +25,6 @@ yarn add @tiptap/extension-horizontal-rule
| -------------- | ---------- | ------------------------- | | -------------- | ---------- | ------------------------- |
| horizontalRule | — | Create a horizontal rule. | | horizontalRule | — | Create a horizontal rule. |
## Keyboard shortcuts
*None*
## Source code ## Source code
[packages/extension-horizontal-rule/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-horizontal-rule/) [packages/extension-horizontal-rule/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-horizontal-rule/)

View File

@ -21,9 +21,11 @@ This extension requires the [`BulletList`](/api/nodes/bullet-list) or [`OrderedL
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | | HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
## Keyboard shortcuts ## Keyboard shortcuts
* New list item: `Enter` | Command | Windows/Linux | macOS |
* Sink a list item: `Tab` | --------------- | ------------------ | ------------------ |
* Lift a list item: `Shift`&nbsp;`Tab` | splitListItem() | `Enter` | `Enter` |
| sinkListItem() | `Tab` | `Tab` |
| liftListItem() | `Shift`&nbsp;`Tab` | `Shift`&nbsp;`Tab` |
## Source code ## Source code
[packages/extension-list-item/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-list-item/) [packages/extension-list-item/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-list-item/)

View File

@ -28,8 +28,9 @@ This extension requires the [`ListItem`](/api/nodes/list-item) node.
| orderedList | — | Toggle an ordered list. | | orderedList | — | Toggle an ordered list. |
## Keyboard shortcuts ## Keyboard shortcuts
* Windows/Linux: `Control`&nbsp;`Shift`&nbsp;`7` | Command | Windows/Linux | macOS |
* macOS: `Cmd`&nbsp;`Shift`&nbsp;`7` | ----------------- | ------------------------------- | --------------------------- |
| toggleOrderedList | `Control`&nbsp;`Shift`&nbsp;`7` | `Cmd`&nbsp;`Shift`&nbsp;`7` |
## Source code ## Source code
[packages/extension-ordered-list/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-ordered-list/) [packages/extension-ordered-list/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-ordered-list/)

View File

@ -28,8 +28,9 @@ yarn add @tiptap/extension-paragraph
| paragraph | — | Transforms all selected nodes to paragraphs. | | paragraph | — | Transforms all selected nodes to paragraphs. |
## Keyboard shortcuts ## Keyboard shortcuts
* Windows & Linux: `Control`&nbsp;`Alt`&nbsp;`0` | Command | Windows/Linux | macOS |
* macOS: `Cmd`&nbsp;`Alt`&nbsp;`0` | -------------- | ----------------------------- | ------------------------- |
| setParagraph() | `Control`&nbsp;`Alt`&nbsp;`0` | `Cmd`&nbsp;`Alt`&nbsp;`0` |
## Source code ## Source code
[packages/extension-paragraph/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-paragraph/) [packages/extension-paragraph/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-paragraph/)

View File

@ -50,7 +50,6 @@ This extension requires the [`TableRow`](/api/nodes/table-row), [`TableHeader`](
| goToPreviousCell | | | | goToPreviousCell | | |
| fixTables | | | | fixTables | | |
## Source code ## Source code
[packages/extension-table/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-table/) [packages/extension-table/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-table/)

View File

@ -23,7 +23,11 @@ This extension requires the [`TaskList`](/api/nodes/task-list) node.
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | | HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
## Keyboard shortcuts ## Keyboard shortcuts
* New list item: `Enter` | Command | Windows/Linux | macOS |
| --------------- | ------------------ | ------------------ |
| splitListItem() | `Enter` | `Enter` |
| sinkListItem() | `Tab` | `Tab` |
| liftListItem() | `Shift`&nbsp;`Tab` | `Shift`&nbsp;`Tab` |
## Source code ## Source code
[packages/extension-task-item/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-task-item/) [packages/extension-task-item/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-task-item/)

View File

@ -28,8 +28,9 @@ This extension requires the [`TaskItem`](/api/nodes/task-item) extension.
| taskList | — | Toggle a task list. | | taskList | — | Toggle a task list. |
## Keyboard shortcuts ## Keyboard shortcuts
* Windows/Linux: `Control`&nbsp;`Shift`&nbsp;`9` | Command | Windows/Linux | macOS |
* macOS: `Cmd`&nbsp;`Shift`&nbsp;`9` | ---------------- | ------------------------------- | --------------------------- |
| toggleTaskList() | `Control`&nbsp;`Shift`&nbsp;`9` | `Cmd`&nbsp;`Shift`&nbsp;`9` |
## Source code ## Source code
[packages/extension-task-list/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-task-list/) [packages/extension-task-list/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-task-list/)