Docs
Excalidraw
Excalidraw
Create drawings and diagrams as block nodes.
Installation
npm install @udecode/plate-excalidraw
Usage
import { ExcalidrawPlugin } from '@udecode/plate-excalidraw/react';
import { SelectOnBackspace } from '@udecode/plate-select';
const plugins = [
// ...otherPlugins
ExcalidrawPlugin,
SelectOnBackspace.configure({
options: { query: { allow: [ExcalidrawPlugin.key] } },
}),
];
Plugins
ExcalidrawPlugin
Adds Excalidraw functionality to the editor.
API
insertExcalidraw
Inserts an Excalidraw element into the editor.
Parameters
Collapse all
The editor instance.
The props for the Excalidraw element.
The options for inserting the Excalidraw element.
API Components
useExcalidrawElement
A behavior hook for the Excalidraw component.
State
Collapse all
- Default:
[]
- Default:
true
The Excalidraw element.
The library items to be displayed in the Excalidraw component.
Determines whether to scroll to the content inside the Excalidraw component.
Returns
Collapse all
The Excalidraw component.
The props to be passed to the Excalidraw component.
Build your editor even faster
Complete, deployable AI-powered template with backend.
All components included.
Customizable and extensible.
Get all-accessCustomizable and extensible.