docs: update the blockquote page
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
[](https://www.npmjs.com/package/@tiptap/extension-blockquote)
|
||||
[](https://npmcharts.com/compare/@tiptap/extension-blockquote?minimal=true)
|
||||
|
||||
The Blockquote extension enables you to use the `<blockquote>` HTML tag in the editor. This is great to use quotes in the editor.
|
||||
The Blockquote extension enables you to use the `<blockquote>` HTML tag in the editor. This is great to … show quotes in the editor, you know?
|
||||
|
||||
Type <code>> </code> at the beginning of a new line and it will magically transform to a blockquote.
|
||||
|
||||
@@ -16,18 +16,44 @@ yarn add @tiptap/extension-blockquote
|
||||
```
|
||||
|
||||
## Settings
|
||||
| Option | Type | Default | Description |
|
||||
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
||||
| 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
|
||||
Blockquote.configure({
|
||||
HTMLAttributes: {
|
||||
class: 'my-custom-class',
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
## Commands
|
||||
| Command | Parameters | Description |
|
||||
| ---------- | ---------- | ----------------------------- |
|
||||
| blockquote | — | Wrap content in a blockquote. |
|
||||
### setBlockquote()
|
||||
Wrap content in a blockquote.
|
||||
|
||||
```js
|
||||
editor.commands.setBlockquote()
|
||||
```
|
||||
|
||||
### toggleBlockquote()
|
||||
Wrap or unwrap a blockquote.
|
||||
|
||||
```js
|
||||
editor.commands.toggleBlockquote()
|
||||
```
|
||||
|
||||
### unsetBlockquote()
|
||||
Unwrap a blockquote.
|
||||
|
||||
```js
|
||||
editor.commands.unsetBlockquote()
|
||||
```
|
||||
|
||||
## Keyboard shortcuts
|
||||
* Windows/Linux: `Control` `Shift` `B`
|
||||
* macOS: `Cmd` `Shift` `B`
|
||||
| Action | Windows/Linux | macOS |
|
||||
| ----------------- | ------------------------------- | --------------------------- |
|
||||
| Toggle Blockquote | `Control` `Shift` `B` | `Cmd` `Shift` `B` |
|
||||
|
||||
## Source code
|
||||
[packages/extension-blockquote/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-blockquote/)
|
||||
|
||||
Reference in New Issue
Block a user