update the text align page

This commit is contained in:
Hans Pagel
2020-11-06 15:44:23 +01:00
parent be44c6c6c7
commit 6beb9d2d69
6 changed files with 93 additions and 15 deletions

View File

@@ -18,9 +18,9 @@ yarn add @tiptap/extension-history
## Commands
| Command | Parameters | Description |
| ------- | ------- | --------------------- |
| undo | — | Undo the last change. |
| redo | — | Redo the last change. |
| ------- | ---------- | --------------------- |
| undo | — | Undo the last change. |
| redo | — | Redo the last change. |
## Keyboard shortcuts
### Undo

View File

@@ -1,4 +1,5 @@
# TextAlign
This extension adds a text align attribute to a specified list of nodes. The attribute is used to align the text.
## Installation
```bash
@@ -10,16 +11,25 @@ yarn add @tiptap/extension-text-align
```
## Settings
*None*
| Option | Type | Default | Description |
| ---------------- | ------ | -------------------------------------- | -------------------------------------------------------------------- |
| types | array | ['heading', 'paragraph'] | A list of nodes where the text align attribute should be applied to. |
| alignments | array | ['left', 'center', 'right', 'justify'] | A list of available options for the text align attribute. |
| defaultAlignment | string | left | The default text align. |
## Commands
*None*
| Command | Parameters | Description |
| --------- | ---------- | ------------------------------------------ |
| textAlign | alignment | Set the text align to the specified value. |
## Keyboard shortcuts
*None*
* `Ctrl` `Shift` `L` Left
* `Ctrl` `Shift` `E` Center
* `Ctrl` `Shift` `R` Right
* `Ctrl` `Shift` `J` Justify
## Source code
[packages/extension-text-align/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-text-align/)
## Usage
<demo name="Extensions/TextAlign" highlight="12,30" />
<demo name="Extensions/TextAlign" highlight="29" />