docs: add HTMLAttributes
This commit is contained in:
@@ -95,7 +95,7 @@ new Editor({
|
|||||||
| --------- | ------------------------------------------------------ |
|
| --------- | ------------------------------------------------------ |
|
||||||
| `'start'` | Sets the focus to the beginning of the document. |
|
| `'start'` | Sets the focus to the beginning of the document. |
|
||||||
| `'end'` | Sets the focus to the end of the document. |
|
| `'end'` | Sets the focus to the end of the document. |
|
||||||
| number | Sets the focus to a specific position in the document. |
|
| `Number` | Sets the focus to a specific position in the document. |
|
||||||
| `true` | Enables autofocus. |
|
| `true` | Enables autofocus. |
|
||||||
| `false` | Disables autofocus. |
|
| `false` | Disables autofocus. |
|
||||||
| `null` | Disables autofocus. |
|
| `null` | Disables autofocus. |
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ yarn add @tiptap/extension-collaboration yjs y-webrtc
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
|
<!-- TODO -->
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| -------- | ---- | ------- | ----------- |
|
| -------- | ---- | ------- | ----------- |
|
||||||
| provider | | | |
|
| provider | | | |
|
||||||
|
|||||||
@@ -12,6 +12,13 @@ npm install @tiptap/extension-dropcursor
|
|||||||
yarn add @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
|
## Source code
|
||||||
[packages/extension-dropcursor/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-dropcursor/)
|
[packages/extension-dropcursor/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-dropcursor/)
|
||||||
|
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ yarn add @tiptap/extension-focus
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| --------- | ------- | --------- | ------------------------------------------------------ |
|
| --------- | --------- | ------------- | ------------------------------------------------------ |
|
||||||
| className | string | has-focus | The class that is applied to the focused element. |
|
| 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. |
|
| nested | `Boolean` | `true` | When enabled nested elements get the focus class, too. |
|
||||||
|
|
||||||
## Source code
|
## Source code
|
||||||
[packages/extension-focus/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-focus/)
|
[packages/extension-focus/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-focus/)
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ yarn add @tiptap/extension-text-style @tiptap/extension-font-family
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ----- | ------------- | ------------------------------------------------------------------------ |
|
| ------ | ------- | --------------- | ------------------------------------------------------------------------ |
|
||||||
| types | array | ['textStyle'] | A list of marks to which the font family attribute should be applied to. |
|
| types | `Array` | `['textStyle']` | A list of marks to which the font family attribute should be applied to. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ yarn add @tiptap/extension-history
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------------- | ------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| depth | number | 100 | The amount of history events that are collected before the oldest events are discarded. Defaults to 100. |
|
| 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 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 |
|
| Command | Parameters | Description |
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ yarn add @tiptap/extension-text-align
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ---------------- | ------ | -------------------------------------- | -------------------------------------------------------------------- |
|
| ---------------- | -------- | ---------------------------------------- | -------------------------------------------------------------------- |
|
||||||
| types | array | ['heading', 'paragraph'] | A list of nodes where the text align attribute should be applied to. |
|
| 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. |
|
| 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 |
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ yarn add @tiptap/extension-bold
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------ | ------- | -------------------------------------------- |
|
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
| ------- | ------- | --------------- |
|
| ------- | ---------- | --------------- |
|
||||||
| bold | — | Mark text bold. |
|
| bold | — | Mark text bold. |
|
||||||
|
|
||||||
## Keyboard shortcuts
|
## Keyboard shortcuts
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ yarn add @tiptap/extension-code
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------ | ------- | -------------------------------------------- |
|
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
| ------- | ------- | ------------------------- |
|
| ------- | ---------- | ------------------------- |
|
||||||
| code | — | Mark text as inline code. |
|
| code | — | Mark text as inline code. |
|
||||||
|
|
||||||
## Keyboard shortcuts
|
## Keyboard shortcuts
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ yarn add @tiptap/extension-highlight
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------ | ------- | -------------------------------------------- |
|
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Options | Description |
|
| Command | Options | Description |
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ yarn add @tiptap/extension-italic
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------ | ------- | -------------------------------------------- |
|
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
| ------- | ------- | ----------------- |
|
| ------- | ---------- | ----------------- |
|
||||||
| italic | — | Mark text italic. |
|
| italic | — | Mark text italic. |
|
||||||
|
|
||||||
## Keyboard shortcuts
|
## Keyboard shortcuts
|
||||||
|
|||||||
@@ -16,11 +16,9 @@ yarn add @tiptap/extension-link
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ----------- | ------- | ---------------------------- | -------------------------------------------- |
|
| -------------- | --------- | ----------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{ target: '_blank', rel: 'noopener noreferrer nofollow' }` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
| openOnClick | boolean | true | If enabled, links will be opened on click. |
|
| openOnClick | `Boolean` | `true` | If enabled, links will be opened on click. |
|
||||||
| rel | string | noopener noreferrer nofollow | Configure the `rel` attribute. |
|
|
||||||
| target | string | _blank | Set the default `target` of links. |
|
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ yarn add @tiptap/extension-strike
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------ | ------- | -------------------------------------------- |
|
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
| ------- | ------- | --------------------------- |
|
| ------- | ---------- | --------------------------- |
|
||||||
| strike | — | Mark text as strikethrough. |
|
| strike | — | Mark text as strikethrough. |
|
||||||
|
|
||||||
## Keyboard shortcuts
|
## Keyboard shortcuts
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ yarn add @tiptap/extension-underline
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------ | ------- | -------------------------------------------- |
|
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ yarn add @tiptap/extension-blockquote
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------ | ------- | -------------------------------------------- |
|
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ yarn add @tiptap/extension-bullet-list @tiptap/extension-list-item
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------ | ------- | -------------------------------------------- |
|
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
| ----------- | ---------- | --------------------- |
|
| ---------- | ---------- | --------------------- |
|
||||||
| bulletList | — | Toggle a bullet list. |
|
| bulletList | — | Toggle a bullet list. |
|
||||||
|
|
||||||
## Keyboard shortcuts
|
## Keyboard shortcuts
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ yarn add @tiptap/extension-code-block
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------------------- | ------ | --------- | ---------------------------------------------------------------- |
|
| ------------------- | -------- | ------------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
| languageClassPrefix | string | language- | Adds a prefix to language classes that are applied to code tags. |
|
| languageClassPrefix | `String` | `'language-'` | Adds a prefix to language classes that are applied to code tags. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ yarn add @tiptap/extension-heading
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------ | ------------------ | --------------------------------------------- |
|
| -------------- | -------- | -------------------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
| levels | array | [1, 2, 3, 4, 5, 6] | Specifies which heading levels are supported. |
|
| levels | `Array` | `[1, 2, 3, 4, 5, 6]` | Specifies which heading levels are supported. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ yarn add @tiptap/extension-horizontal-rule
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------ | ------- | -------------------------------------------- |
|
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
|
|||||||
@@ -16,8 +16,9 @@ yarn add @tiptap/extension-image
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------- | ------- | ------------------------------ |
|
| -------------- | --------- | ------- | --------------------------------------------------------------------- |
|
||||||
| inline | boolean | false | Renders the image node inline. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
|
| inline | `Boolean` | `false` | Renders the image node inline. |
|
||||||
|
|
||||||
## Source code
|
## Source code
|
||||||
[packages/extension-image/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-image/)
|
[packages/extension-image/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-image/)
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ yarn add @tiptap/extension-list-item
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------ | ------- | -------------------------------------------- |
|
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
|
|
||||||
## Keyboard shortcuts
|
## Keyboard shortcuts
|
||||||
* New list item: `Enter`
|
* New list item: `Enter`
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ yarn add @tiptap/extension-ordered-list @tiptap/extension-list-item
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------ | ------- | -------------------------------------------- |
|
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ yarn add @tiptap/extension-paragraph
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------ | ------- | -------------------------------------------- |
|
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ yarn add @tiptap/extension-task-list @tiptap/extension-task-item
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------ | ------- | -------------------------------------------- |
|
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
|
|
||||||
## Keyboard shortcuts
|
## Keyboard shortcuts
|
||||||
* New list item: `Enter`
|
* New list item: `Enter`
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ yarn add @tiptap/extension-task-list @tiptap/extension-task-item
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | ------ | ------- | -------------------------------------------- |
|
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
||||||
| class | string | – | Add a custom class to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
|
|||||||
Reference in New Issue
Block a user