diff --git a/docs/src/docPages/api/editor.md b/docs/src/docPages/api/editor.md index c3f18136..92ce16c2 100644 --- a/docs/src/docPages/api/editor.md +++ b/docs/src/docPages/api/editor.md @@ -95,7 +95,7 @@ new Editor({ | --------- | ------------------------------------------------------ | | `'start'` | Sets the focus to the beginning 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. | | `false` | Disables autofocus. | | `null` | Disables autofocus. | diff --git a/docs/src/docPages/api/extensions/collaboration.md b/docs/src/docPages/api/extensions/collaboration.md index 0957ca1f..452f128d 100644 --- a/docs/src/docPages/api/extensions/collaboration.md +++ b/docs/src/docPages/api/extensions/collaboration.md @@ -15,6 +15,7 @@ yarn add @tiptap/extension-collaboration yjs y-webrtc ``` ## Settings + | Option | Type | Default | Description | | -------- | ---- | ------- | ----------- | | provider | | | | diff --git a/docs/src/docPages/api/extensions/dropcursor.md b/docs/src/docPages/api/extensions/dropcursor.md index 26dfb20a..d2fb9403 100644 --- a/docs/src/docPages/api/extensions/dropcursor.md +++ b/docs/src/docPages/api/extensions/dropcursor.md @@ -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/) diff --git a/docs/src/docPages/api/extensions/focus.md b/docs/src/docPages/api/extensions/focus.md index 122a67b6..988cb484 100644 --- a/docs/src/docPages/api/extensions/focus.md +++ b/docs/src/docPages/api/extensions/focus.md @@ -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/) diff --git a/docs/src/docPages/api/extensions/font-family.md b/docs/src/docPages/api/extensions/font-family.md index b5f19940..a4930fc0 100644 --- a/docs/src/docPages/api/extensions/font-family.md +++ b/docs/src/docPages/api/extensions/font-family.md @@ -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 | diff --git a/docs/src/docPages/api/extensions/history.md b/docs/src/docPages/api/extensions/history.md index 6423e938..5e8b9d97 100644 --- a/docs/src/docPages/api/extensions/history.md +++ b/docs/src/docPages/api/extensions/history.md @@ -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 aren’t 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 aren’t adjacent, a new group is always started. | ## Commands | Command | Parameters | Description | diff --git a/docs/src/docPages/api/extensions/text-align.md b/docs/src/docPages/api/extensions/text-align.md index e8cd2ab2..6529894f 100644 --- a/docs/src/docPages/api/extensions/text-align.md +++ b/docs/src/docPages/api/extensions/text-align.md @@ -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 | diff --git a/docs/src/docPages/api/marks/bold.md b/docs/src/docPages/api/marks/bold.md index d991247c..003bd3ff 100644 --- a/docs/src/docPages/api/marks/bold.md +++ b/docs/src/docPages/api/marks/bold.md @@ -17,14 +17,14 @@ yarn add @tiptap/extension-bold ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------ | ------- | -------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | +| Option | Type | Default | Description | +| -------------- | -------- | ------- | --------------------------------------------------------------------- | +| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | ## Commands | Command | Parameters | Description | -| ------- | ------- | --------------- | -| bold | — | Mark text bold. | +| ------- | ---------- | --------------- | +| bold | — | Mark text bold. | ## Keyboard shortcuts * Windows/Linux: `Control` `B` diff --git a/docs/src/docPages/api/marks/code.md b/docs/src/docPages/api/marks/code.md index e6f34272..a7bfde34 100644 --- a/docs/src/docPages/api/marks/code.md +++ b/docs/src/docPages/api/marks/code.md @@ -13,14 +13,14 @@ yarn add @tiptap/extension-code ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------ | ------- | -------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | +| Option | Type | Default | Description | +| -------------- | -------- | ------- | --------------------------------------------------------------------- | +| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | ## Commands | Command | Parameters | Description | -| ------- | ------- | ------------------------- | -| code | — | Mark text as inline code. | +| ------- | ---------- | ------------------------- | +| code | — | Mark text as inline code. | ## Keyboard shortcuts * `Alt` ` diff --git a/docs/src/docPages/api/marks/highlight.md b/docs/src/docPages/api/marks/highlight.md index 5da69388..4e0ce114 100644 --- a/docs/src/docPages/api/marks/highlight.md +++ b/docs/src/docPages/api/marks/highlight.md @@ -13,9 +13,9 @@ yarn add @tiptap/extension-highlight ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------ | ------- | -------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | +| Option | Type | Default | Description | +| -------------- | -------- | ------- | --------------------------------------------------------------------- | +| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | ## Commands | Command | Options | Description | diff --git a/docs/src/docPages/api/marks/italic.md b/docs/src/docPages/api/marks/italic.md index 40717304..032c09ad 100644 --- a/docs/src/docPages/api/marks/italic.md +++ b/docs/src/docPages/api/marks/italic.md @@ -17,14 +17,14 @@ yarn add @tiptap/extension-italic ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------ | ------- | -------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | +| Option | Type | Default | Description | +| -------------- | -------- | ------- | --------------------------------------------------------------------- | +| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | ## Commands | Command | Parameters | Description | -| ------- | ------- | ----------------- | -| italic | — | Mark text italic. | +| ------- | ---------- | ----------------- | +| italic | — | Mark text italic. | ## Keyboard shortcuts * Windows/Linux: `Control` `I` diff --git a/docs/src/docPages/api/marks/link.md b/docs/src/docPages/api/marks/link.md index 6246101d..5d3255bc 100644 --- a/docs/src/docPages/api/marks/link.md +++ b/docs/src/docPages/api/marks/link.md @@ -15,12 +15,10 @@ yarn add @tiptap/extension-link ``` ## Settings -| Option | Type | Default | Description | -| ----------- | ------- | ---------------------------- | -------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | -| 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. | +| Option | Type | Default | Description | +| -------------- | --------- | ----------------------------------------------------------- | --------------------------------------------------------------------- | +| 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. | ## Commands | Command | Parameters | Description | diff --git a/docs/src/docPages/api/marks/strike.md b/docs/src/docPages/api/marks/strike.md index 16a1b780..056d227e 100644 --- a/docs/src/docPages/api/marks/strike.md +++ b/docs/src/docPages/api/marks/strike.md @@ -17,14 +17,14 @@ yarn add @tiptap/extension-strike ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------ | ------- | -------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | +| Option | Type | Default | Description | +| -------------- | -------- | ------- | --------------------------------------------------------------------- | +| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | ## Commands | Command | Parameters | Description | -| ------- | ------- | --------------------------- | -| strike | — | Mark text as strikethrough. | +| ------- | ---------- | --------------------------- | +| strike | — | Mark text as strikethrough. | ## Keyboard shortcuts * Windows/Linux: `Control` `D` diff --git a/docs/src/docPages/api/marks/underline.md b/docs/src/docPages/api/marks/underline.md index 2f5045a7..f685936d 100644 --- a/docs/src/docPages/api/marks/underline.md +++ b/docs/src/docPages/api/marks/underline.md @@ -17,9 +17,9 @@ yarn add @tiptap/extension-underline ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------ | ------- | -------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | +| Option | Type | Default | Description | +| -------------- | -------- | ------- | --------------------------------------------------------------------- | +| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | ## Commands | Command | Parameters | Description | diff --git a/docs/src/docPages/api/nodes/blockquote.md b/docs/src/docPages/api/nodes/blockquote.md index 7a58e85d..d7a315a2 100644 --- a/docs/src/docPages/api/nodes/blockquote.md +++ b/docs/src/docPages/api/nodes/blockquote.md @@ -14,9 +14,9 @@ yarn add @tiptap/extension-blockquote ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------ | ------- | -------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | +| Option | Type | Default | Description | +| -------------- | -------- | ------- | --------------------------------------------------------------------- | +| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | ## Commands | Command | Parameters | Description | diff --git a/docs/src/docPages/api/nodes/bullet-list.md b/docs/src/docPages/api/nodes/bullet-list.md index b6f85546..ec216d79 100644 --- a/docs/src/docPages/api/nodes/bullet-list.md +++ b/docs/src/docPages/api/nodes/bullet-list.md @@ -17,13 +17,13 @@ yarn add @tiptap/extension-bullet-list @tiptap/extension-list-item ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------ | ------- | -------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | +| Option | Type | Default | Description | +| -------------- | -------- | ------- | --------------------------------------------------------------------- | +| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | ## Commands -| Command | Parameters | Description | -| ----------- | ---------- | --------------------- | +| Command | Parameters | Description | +| ---------- | ---------- | --------------------- | | bulletList | — | Toggle a bullet list. | ## Keyboard shortcuts diff --git a/docs/src/docPages/api/nodes/code-block.md b/docs/src/docPages/api/nodes/code-block.md index 1dce417e..78834f03 100644 --- a/docs/src/docPages/api/nodes/code-block.md +++ b/docs/src/docPages/api/nodes/code-block.md @@ -17,10 +17,10 @@ yarn add @tiptap/extension-code-block ``` ## Settings -| Option | Type | Default | Description | -| ------------------- | ------ | --------- | ---------------------------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | -| languageClassPrefix | string | language- | Adds a prefix to language classes that are applied to code tags. | +| Option | Type | Default | Description | +| ------------------- | -------- | ------------- | --------------------------------------------------------------------- | +| 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. | ## Commands | Command | Parameters | Description | diff --git a/docs/src/docPages/api/nodes/heading.md b/docs/src/docPages/api/nodes/heading.md index 15e4ac96..c4cce893 100644 --- a/docs/src/docPages/api/nodes/heading.md +++ b/docs/src/docPages/api/nodes/heading.md @@ -13,10 +13,10 @@ yarn add @tiptap/extension-heading ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------ | ------------------ | --------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | -| levels | array | [1, 2, 3, 4, 5, 6] | Specifies which heading levels are supported. | +| Option | Type | Default | Description | +| -------------- | -------- | -------------------- | --------------------------------------------------------------------- | +| 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. | ## Commands | Command | Parameters | Description | diff --git a/docs/src/docPages/api/nodes/horizontal-rule.md b/docs/src/docPages/api/nodes/horizontal-rule.md index 81b6c0e7..44b083f8 100644 --- a/docs/src/docPages/api/nodes/horizontal-rule.md +++ b/docs/src/docPages/api/nodes/horizontal-rule.md @@ -13,9 +13,9 @@ yarn add @tiptap/extension-horizontal-rule ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------ | ------- | -------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | +| Option | Type | Default | Description | +| -------------- | -------- | ------- | --------------------------------------------------------------------- | +| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | ## Commands | Command | Parameters | Description | diff --git a/docs/src/docPages/api/nodes/image.md b/docs/src/docPages/api/nodes/image.md index a4e93205..76a12785 100644 --- a/docs/src/docPages/api/nodes/image.md +++ b/docs/src/docPages/api/nodes/image.md @@ -15,9 +15,10 @@ yarn add @tiptap/extension-image ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------- | ------- | ------------------------------ | -| inline | boolean | false | Renders the image node inline. | +| Option | Type | Default | Description | +| -------------- | --------- | ------- | --------------------------------------------------------------------- | +| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | +| inline | `Boolean` | `false` | Renders the image node inline. | ## Source code [packages/extension-image/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-image/) diff --git a/docs/src/docPages/api/nodes/list-item.md b/docs/src/docPages/api/nodes/list-item.md index 2f6408b2..54c21751 100644 --- a/docs/src/docPages/api/nodes/list-item.md +++ b/docs/src/docPages/api/nodes/list-item.md @@ -15,9 +15,9 @@ yarn add @tiptap/extension-list-item ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------ | ------- | -------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | +| Option | Type | Default | Description | +| -------------- | -------- | ------- | --------------------------------------------------------------------- | +| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | ## Keyboard shortcuts * New list item: `Enter` diff --git a/docs/src/docPages/api/nodes/ordered-list.md b/docs/src/docPages/api/nodes/ordered-list.md index 5693ddb0..2c52982e 100644 --- a/docs/src/docPages/api/nodes/ordered-list.md +++ b/docs/src/docPages/api/nodes/ordered-list.md @@ -17,9 +17,9 @@ yarn add @tiptap/extension-ordered-list @tiptap/extension-list-item ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------ | ------- | -------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | +| Option | Type | Default | Description | +| -------------- | -------- | ------- | --------------------------------------------------------------------- | +| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | ## Commands | Command | Parameters | Description | diff --git a/docs/src/docPages/api/nodes/paragraph.md b/docs/src/docPages/api/nodes/paragraph.md index 6a3013d7..b36ed947 100644 --- a/docs/src/docPages/api/nodes/paragraph.md +++ b/docs/src/docPages/api/nodes/paragraph.md @@ -15,9 +15,9 @@ yarn add @tiptap/extension-paragraph ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------ | ------- | -------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | +| Option | Type | Default | Description | +| -------------- | -------- | ------- | --------------------------------------------------------------------- | +| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | ## Commands | Command | Parameters | Description | diff --git a/docs/src/docPages/api/nodes/task-item.md b/docs/src/docPages/api/nodes/task-item.md index 82209b49..7e1e8487 100644 --- a/docs/src/docPages/api/nodes/task-item.md +++ b/docs/src/docPages/api/nodes/task-item.md @@ -17,9 +17,9 @@ yarn add @tiptap/extension-task-list @tiptap/extension-task-item ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------ | ------- | -------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | +| Option | Type | Default | Description | +| -------------- | -------- | ------- | --------------------------------------------------------------------- | +| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | ## Keyboard shortcuts * New list item: `Enter` diff --git a/docs/src/docPages/api/nodes/task-list.md b/docs/src/docPages/api/nodes/task-list.md index 82a74d4b..5a71e247 100644 --- a/docs/src/docPages/api/nodes/task-list.md +++ b/docs/src/docPages/api/nodes/task-list.md @@ -17,9 +17,9 @@ yarn add @tiptap/extension-task-list @tiptap/extension-task-item ``` ## Settings -| Option | Type | Default | Description | -| ------ | ------ | ------- | -------------------------------------------- | -| class | string | – | Add a custom class to the rendered HTML tag. | +| Option | Type | Default | Description | +| -------------- | -------- | ------- | --------------------------------------------------------------------- | +| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. | ## Commands | Command | Parameters | Description |