docs: make all extenion settings a list

This commit is contained in:
Hans Pagel
2021-10-02 01:20:09 +02:00
parent 4487fb0d75
commit 9ed883edd4
21 changed files with 586 additions and 115 deletions

View File

@@ -16,10 +16,28 @@ yarn add @tiptap/extension-highlight
```
## Settings
| Option | Type | Default | Description |
| -------------- | --------- | ------- | --------------------------------------------------------------------- |
| multicolor | `Boolean` | `false` | Add support for multiple colors. |
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
### HTMLAttributes
Custom HTML attributes that should be added to the rendered HTML tag.
```js
Highlight.configure({
HTMLAttributes: {
class: 'my-custom-class',
},
})
```
### multicolor
Add support for multiple colors.
Default: `false`
```js
Highlight.configure({
multicolor: true,
})
```
## Commands

View File

@@ -18,11 +18,40 @@ yarn add @tiptap/extension-link
```
## Settings
| 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. |
| linkOnPaste | `Boolean` | `true` | Adds a link to the current selection if the pasted content only contains an url. |
### HTMLAttributes
Custom HTML attributes that should be added to the rendered HTML tag.
```js
Link.configure({
HTMLAttributes: {
class: 'my-custom-class',
},
})
```
### openOnClick
If enabled, links will be opened on click.
Default: `true`
```js
Link.configure({
openOnClick: false,
})
```
### linkOnPaste
Adds a link to the current selection if the pasted content only contains an url.
Default: `true`
```js
Link.configure({
linkOnPaste: false,
})
```
## Commands