tiptap/docs/src/docPages/api/nodes/image.md

27 lines
820 B
Markdown
Raw Normal View History

2020-10-27 22:32:55 +08:00
# Image
Use this extension to render `<img>` HTML tags. By default, those images are blocks. If you want to render images in line with text set the `inline` option to `true`.
:::warning Restrictions
This extension does only the rendering of images. It doesnt upload images to your server, thats a whole different story.
:::
2020-10-27 22:32:55 +08:00
## Installation
```bash
2020-10-30 21:24:16 +08:00
# with npm
2020-10-27 22:32:55 +08:00
npm install @tiptap/extension-image
2020-10-30 21:24:16 +08:00
# with Yarn
2020-10-27 22:32:55 +08:00
yarn add @tiptap/extension-image
```
2020-10-30 23:57:55 +08:00
## Settings
| Option | Type | Default | Description |
| ------ | ------- | ------- | ------------------------------ |
| inline | boolean | false | Renders the image node inline. |
2020-10-30 23:57:55 +08:00
2020-10-27 22:32:55 +08:00
## Source code
[packages/extension-image/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-image/)
## Usage
<demo name="Nodes/Image" />