Features
- Add captions to images, videos, audio files, and other media elements.
- Arrow navigation selects caption within a block.
- Inline caption editing with textarea component.
Usage
Installation
The fastest way to add caption functionality is with the MediaKit, which includes the pre-configured CaptionPlugin along with media plugins and their Plate UI components.
Caption: Renders caption components for media elements.
Add Kit
import { createPlateEditor } from "platejs/react";
import { MediaKit } from "@/components/editor/plugins/media-kit";
const editor = createPlateEditor({
plugins: [
// ...otherPlugins,
...MediaKit,
],
});