docs: make all extension keyboard shortcuts a table
This commit is contained in:
@@ -18,11 +18,11 @@ yarn add @tiptap/extension-text-align
|
||||
```
|
||||
|
||||
## Settings
|
||||
| Option | Type | Default | Description |
|
||||
| ---------------- | -------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
||||
| 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. |
|
||||
| defaultAlignment | `String` | `'left'` | The default text align. |
|
||||
| Option | Type | Default | Description |
|
||||
| ---------------- | -------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| 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. |
|
||||
| defaultAlignment | `String` | `'left'` | The default text align. |
|
||||
|
||||
## Commands
|
||||
| Command | Parameters | Description |
|
||||
@@ -30,17 +30,12 @@ yarn add @tiptap/extension-text-align
|
||||
| textAlign | alignment | Set the text align to the specified value. |
|
||||
|
||||
## Keyboard shortcuts
|
||||
### Windows/Linux
|
||||
* `Ctrl` `Shift` `L` Left
|
||||
* `Ctrl` `Shift` `E` Center
|
||||
* `Ctrl` `Shift` `R` Right
|
||||
* `Ctrl` `Shift` `J` Justify
|
||||
|
||||
### macOS
|
||||
* `Cmd` `Shift` `L` Left
|
||||
* `Cmd` `Shift` `E` Center
|
||||
* `Cmd` `Shift` `R` Right
|
||||
* `Cmd` `Shift` `J` Justify
|
||||
| Command | Windows/Linux | macOS |
|
||||
| ----------------------- | ---------------------------- | --------------------------- |
|
||||
| setTextAlign('left') | `Ctrl` `Shift` `L` | `Cmd` `Shift` `L` |
|
||||
| setTextAlign('center') | `Ctrl` `Shift` `E` | `Cmd` `Shift` `E` |
|
||||
| setTextAlign('right') | `Ctrl` `Shift` `R` | `Cmd` `Shift` `R` |
|
||||
| setTextAlign('justify') | `Ctrl` `Shift` `J` | `Cmd` `Shift` `J` |
|
||||
|
||||
## Source code
|
||||
[packages/extension-text-align/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-text-align/)
|
||||
|
||||
Reference in New Issue
Block a user