docs: add HTMLAttributes

This commit is contained in:
Hans Pagel
2020-11-18 12:12:34 +01:00
parent be5a715926
commit c47e4d1f6d
25 changed files with 93 additions and 86 deletions

View File

@@ -15,6 +15,7 @@ yarn add @tiptap/extension-collaboration yjs y-webrtc
```
## Settings
<!-- TODO -->
| Option | Type | Default | Description |
| -------- | ---- | ------- | ----------- |
| provider | | | |

View File

@@ -12,6 +12,13 @@ npm install @tiptap/extension-dropcursor
yarn add @tiptap/extension-dropcursor
```
## Settings
| Option | Type | Default | Description |
| ------ | -------- | --------- | --------------------------------------------------------------------- |
| color | `String` | `'black'` | Color of the dropcursor. |
| width | `Number` | `1` | Width of the dropcursor. |
| class | `String` | | One or multiple CSS classes that should be applied to the dropcursor. |
## Source code
[packages/extension-dropcursor/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-dropcursor/)

View File

@@ -13,10 +13,10 @@ yarn add @tiptap/extension-focus
```
## Settings
| Option | Type | Default | Description |
| --------- | ------- | --------- | ------------------------------------------------------ |
| className | string | has-focus | The class that is applied to the focused element. |
| nested | boolean | true | When enabled nested elements get the focus class, too. |
| Option | Type | Default | Description |
| --------- | --------- | ------------- | ------------------------------------------------------ |
| className | `String` | `'has-focus'` | The class that is applied to the focused element. |
| nested | `Boolean` | `true` | When enabled nested elements get the focus class, too. |
## Source code
[packages/extension-focus/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-focus/)

View File

@@ -15,9 +15,9 @@ yarn add @tiptap/extension-text-style @tiptap/extension-font-family
```
## Settings
| Option | Type | Default | Description |
| ------ | ----- | ------------- | ------------------------------------------------------------------------ |
| types | array | ['textStyle'] | A list of marks to which the font family attribute should be applied to. |
| Option | Type | Default | Description |
| ------ | ------- | --------------- | ------------------------------------------------------------------------ |
| types | `Array` | `['textStyle']` | A list of marks to which the font family attribute should be applied to. |
## Commands
| Command | Parameters | Description |

View File

@@ -11,10 +11,10 @@ yarn add @tiptap/extension-history
```
## Settings
| Option | Type | Default | Description |
| ------------- | ------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| depth | number | 100 | The amount of history events that are collected before the oldest events are discarded. Defaults to 100. |
| 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. |
| Option | Type | Default | Description |
| ------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| depth | `Number` | `100` | The amount of history events that are collected before the oldest events are discarded. Defaults to 100. |
| 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 |

View File

@@ -11,11 +11,11 @@ yarn add @tiptap/extension-text-align
```
## Settings
| 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. |
| 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
| Command | Parameters | Description |