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

@@ -23,6 +23,16 @@ yarn add @tiptap/extension-image
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
| inline | `Boolean` | `false` | Renders the image node inline. |
## Commands
### setImage()
Makes the current node an image.
```js
editor.commands.setImage({ src: 'https://example.com/foobar.png')
editor.commands.setImage({ src: 'https://example.com/foobar.png', alt: 'A boring example image', title: 'An example' })
```
## Source code
[packages/extension-image/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-image/)