docs: make all node commands a list

This commit is contained in:
Hans Pagel
2021-10-02 00:14:44 +02:00
parent 2fccba79cb
commit 4487fb0d75
13 changed files with 229 additions and 49 deletions

View File

@@ -26,9 +26,20 @@ yarn add @tiptap/extension-code-block
| languageClassPrefix | `String` | `'language-'` | Adds a prefix to language classes that are applied to code tags. |
## Commands
| Command | Parameters | Description |
| --------- | ---------- | ----------------------------- |
| codeBlock | — | Wrap content in a code block. |
### setCodeBlock()
Wrap content in a code block.
```js
editor.commands.setCodeBlock()
```
### toggleCodeBlock()
Toggle the code block.
```js
editor.commands.toggleCodeBlock()
```
## Keyboard shortcuts
| Command | Windows/Linux | macOS |