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-heading
```
## Settings
| 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. |
### HTMLAttributes
Custom HTML attributes that should be added to the rendered HTML tag.
```js
Heading.configure({
HTMLAttributes: {
class: 'my-custom-class',
},
})
```
### levels
Specifies which heading levels are supported.
Default: `[1, 2, 3, 4, 5, 6]`
```js
Heading.configure({
levels: [1, 2],
})
```
## Commands