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

@@ -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`

View File

@@ -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`&nbsp;<code>`</code>

View File

@@ -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 |

View File

@@ -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`&nbsp;`I`

View File

@@ -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 |

View File

@@ -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`&nbsp;`D`

View File

@@ -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 |