Loading...
Features
- Integrates Excalidraw library for creation of drawings and diagrams.
Installation
pnpm add @platejs/excalidraw
Usage
import { ExcalidrawPlugin } from '@platejs/excalidraw/react';
const plugins = [
// ...otherPlugins
ExcalidrawPlugin,
];
Insert Toolbar Button
You can add this item to the Insert Toolbar Button to insert Excalidraw elements:
{
icon: <PenToolIcon />,
label: 'Excalidraw',
value: KEYS.excalidraw,
}
Plugins
ExcalidrawPlugin
Excalidraw void element plugin.
API
insertExcalidraw
Inserts an Excalidraw element into the editor.
Hooks
useExcalidrawElement
A behavior hook for the Excalidraw component.