Features
- Add toggles to your document
- Toggles are closed by default, and can be opened to reveal the content inside
Usage
Installation
The fastest way to add toggle functionality is with the ToggleKit, which includes pre-configured TogglePlugin with indent support and their Plate UI components.
IndentKit: Provides indent support for toggle elements.ToggleElement: Renders toggle elements.
Add Kit
Add the kit to your plugins:
import { createPlateEditor } from "platejs/react";
import { ToggleKit } from "@/components/editor/plugins/toggle-kit";
const editor = createPlateEditor({
plugins: [
// ...otherPlugins,
...ToggleKit,
],
});



