Docs
Caption
Caption
Add captions to your blocks.
📸 Image
Add images by either uploading them or providing the image URL:
Customize image captions and resize images.
📺 Embed
Embed various types of content, such as videos and tweets:
Installation
npm install @udecode/plate-captionUsage
import { createCaptionPlugin } from './createCaptionPlugin';
const plugins = [
// ...otherPlugins,
createCaptionPlugin({
options: { pluginKeys: [ELEMENT_IMAGE, ELEMENT_MEDIA_EMBED] },
}),
];API
createCaptionPlugin
Options
Collapse all
The plugin key of the blocks that have caption.
TCaptionElement
Attributes
Collapse all
Extends TElement.
Caption value.
API Components
Caption
Props
Collapse all
CaptionTextarea
Props
Collapse all