docs: make all extension keyboard shortcuts a table
This commit is contained in:
@@ -33,13 +33,10 @@ yarn add @tiptap/extension-collaboration yjs y-websocket
|
|||||||
| redo | — | Redo the last change. |
|
| redo | — | Redo the last change. |
|
||||||
|
|
||||||
## Keyboard shortcuts
|
## Keyboard shortcuts
|
||||||
### Undo
|
| Command | Windows/Linux | macOS |
|
||||||
* Windows/Linux: `Control` `Z`
|
| ------- | ----------------------------------------------------- | --------------------------------------------- |
|
||||||
* macOS: `Cmd` `Z`
|
| undo() | `Control` `Z` | `Cmd` `Z` |
|
||||||
|
| redo() | `Shift` `Control` `Z`<br>`Control` `Y` | `Shift` `Cmd` `Z`<br>`Cmd` `Y` |
|
||||||
### Redo
|
|
||||||
* Windows/Linux: `Shift` `Control` `Z` or `Control` `Y`
|
|
||||||
* macOS: `Shift` `Cmd` `Z` or `Cmd` `Y`
|
|
||||||
|
|
||||||
## Source code
|
## Source code
|
||||||
[packages/extension-collaboration/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-collaboration/)
|
[packages/extension-collaboration/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-collaboration/)
|
||||||
|
|||||||
@@ -20,25 +20,25 @@ yarn add @tiptap/extension-history
|
|||||||
| newGroupDelay | `Number` | `500` | The delay between changes after which a new group should be started (in milliseconds). When changes aren’t adjacent, a new group is always started. |
|
| newGroupDelay | `Number` | `500` | The delay between changes after which a new group should be started (in milliseconds). When changes aren’t adjacent, a new group is always started. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
|
||||||
| ------- | ---------- | --------------------- |
|
### undo()
|
||||||
| undo | — | Undo the last change. |
|
Undo the last change.
|
||||||
| redo | — | Redo the last change. |
|
|
||||||
|
```js
|
||||||
|
editor.commands.undo()
|
||||||
|
```
|
||||||
|
### redo()
|
||||||
|
Redo the last change.
|
||||||
|
|
||||||
|
```js
|
||||||
|
editor.commands.redo()
|
||||||
|
```
|
||||||
|
|
||||||
## Keyboard shortcuts
|
## Keyboard shortcuts
|
||||||
### Undo
|
| Command | Windows/Linux | macOS |
|
||||||
* Windows/Linux: `Control` `Z`
|
| ------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
||||||
* macOS: `Cmd` `Z`
|
| undo() | `Control` `Z`<br>`Control` `я` | `Cmd` `Z`<br>`Cmd` `я` |
|
||||||
#### Russian keyboard layouts
|
| redo() | `Shift` `Control` `Z`<br>`Control` `Y`<br>`Shift` `Control` `я` | `Shift` `Cmd` `Z`<br>`Cmd` `Y`<br>`Shift` `Cmd` `я` |
|
||||||
* Windows/Linux: `Control` `я`
|
|
||||||
* macOS: `Cmd` `я`
|
|
||||||
|
|
||||||
### Redo
|
|
||||||
* Windows/Linux: `Shift` `Control` `Z` or `Control` `Y`
|
|
||||||
* macOS: `Shift` `Cmd` `Z` or `Cmd` `Y`
|
|
||||||
#### Russian keyboard layouts
|
|
||||||
* Windows/Linux: `Shift` `Control` `я`
|
|
||||||
* macOS: `Shift` `Cmd` `я`
|
|
||||||
|
|
||||||
## Source code
|
## Source code
|
||||||
[packages/extension-history/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-history/)
|
[packages/extension-history/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-history/)
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ yarn add @tiptap/extension-text-align
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ---------------- | -------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
| ---------------- | -------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||||
| types | `Array` | `[]` | A list of nodes where the text align attribute should be applied to. Usually something like `['heading', 'paragraph']`.|
|
| types | `Array` | `[]` | A list of nodes where the text align attribute should be applied to. Usually something like `['heading', 'paragraph']`. |
|
||||||
| alignments | `Array` | `['left', 'center', 'right', 'justify']` | A list of available options for the text align attribute. |
|
| alignments | `Array` | `['left', 'center', 'right', 'justify']` | A list of available options for the text align attribute. |
|
||||||
| defaultAlignment | `String` | `'left'` | The default text align. |
|
| defaultAlignment | `String` | `'left'` | The default text align. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
@@ -30,17 +30,12 @@ yarn add @tiptap/extension-text-align
|
|||||||
| textAlign | alignment | Set the text align to the specified value. |
|
| textAlign | alignment | Set the text align to the specified value. |
|
||||||
|
|
||||||
## Keyboard shortcuts
|
## Keyboard shortcuts
|
||||||
### Windows/Linux
|
| Command | Windows/Linux | macOS |
|
||||||
* `Ctrl` `Shift` `L` Left
|
| ----------------------- | ---------------------------- | --------------------------- |
|
||||||
* `Ctrl` `Shift` `E` Center
|
| setTextAlign('left') | `Ctrl` `Shift` `L` | `Cmd` `Shift` `L` |
|
||||||
* `Ctrl` `Shift` `R` Right
|
| setTextAlign('center') | `Ctrl` `Shift` `E` | `Cmd` `Shift` `E` |
|
||||||
* `Ctrl` `Shift` `J` Justify
|
| setTextAlign('right') | `Ctrl` `Shift` `R` | `Cmd` `Shift` `R` |
|
||||||
|
| setTextAlign('justify') | `Ctrl` `Shift` `J` | `Cmd` `Shift` `J` |
|
||||||
### macOS
|
|
||||||
* `Cmd` `Shift` `L` Left
|
|
||||||
* `Cmd` `Shift` `E` Center
|
|
||||||
* `Cmd` `Shift` `R` Right
|
|
||||||
* `Cmd` `Shift` `J` Justify
|
|
||||||
|
|
||||||
## Source code
|
## Source code
|
||||||
[packages/extension-text-align/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-text-align/)
|
[packages/extension-text-align/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-text-align/)
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ yarn add @tiptap/extension-typography
|
|||||||
| superscriptThree | Converts `^3` a superscript three `³`. |
|
| superscriptThree | Converts `^3` a superscript three `³`. |
|
||||||
|
|
||||||
## Keyboard shortcuts
|
## Keyboard shortcuts
|
||||||
* `Backspace` reverts the applied input rule
|
| Command | Windows/Linux | macOS |
|
||||||
|
| --------------- | ------------- | ----------- |
|
||||||
|
| undoInputRule() | `Backspace` | `Backspace` |
|
||||||
|
|
||||||
## Source code
|
## Source code
|
||||||
[packages/extension-typography/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-typography/)
|
[packages/extension-typography/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-typography/)
|
||||||
|
|||||||
Reference in New Issue
Block a user