docs: make all extension keyboard shortcuts a table

This commit is contained in:
Hans Pagel
2021-10-01 23:13:49 +02:00
parent bf06eef9f6
commit d3aa7903bd
4 changed files with 35 additions and 41 deletions

View File

@@ -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 arent adjacent, a new group is always started. |
## Commands
| Command | Parameters | Description |
| ------- | ---------- | --------------------- |
| undo | — | Undo the last change. |
| redo | — | Redo the last change. |
### undo()
Undo the last change.
```js
editor.commands.undo()
```
### redo()
Redo the last change.
```js
editor.commands.redo()
```
## Keyboard shortcuts
### Undo
* Windows/Linux: `Control` `Z`
* macOS: `Cmd` `Z`
#### Russian keyboard layouts
* 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` `я`
| Command | Windows/Linux | macOS |
| ------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| undo() | `Control`&nbsp;`Z`<br>`Control`&nbsp;`я` | `Cmd`&nbsp;`Z`<br>`Cmd`&nbsp;`я` |
| redo() | `Shift`&nbsp;`Control`&nbsp;`Z`<br>`Control`&nbsp;`Y`<br>`Shift`&nbsp;`Control`&nbsp;`я` | `Shift`&nbsp;`Cmd`&nbsp;`Z`<br>`Cmd`&nbsp;`Y`<br>`Shift`&nbsp;`Cmd`&nbsp;`я` |
## Source code
[packages/extension-history/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-history/)