Plate Editor
API reference for Plate editor.
A custom editor interface that extends the base TEditor
interface and includes additional properties and methods specific to the Plate library.
Core Properties
Parameters
- Default:
false
A unique identifier for the editor.
A key that can be used to uniquely identify the editor.
The current keyboard event being processed by the editor, or null if no event is being processed.
Whether the editor is a fallback editor.
The previous selection range in the editor.
An array of plugins that are currently being used by the editor.
A record of plugins indexed by their keys.
API Methods
Parameters
Retrieve the typed API for a plugin.
Get the typed transforms for a plugin.
Retrieve the editor plugin instance by its key or base plugin.
Get the node type associated with a plugin.
Option Methods
Parameters
Get a specific option value for a plugin.
Get all options for a plugin.
Set a specific option value for a plugin.
Set multiple options for a plugin.
Get the zustand-x options store for a plugin.
React Hooks
Parameters
Subscribe to a specific option value in a React component.
Subscribe to plugin options or a derived value from options in a React component.
Plate Store Methods
Parameters
Update the global Plate state.
Core Plugin APIs
DebugPlugin
Parameters
Log a message at the 'log' level.
Log a message at the 'info' level.
Log a message at the 'warn' level.
Log a message at the 'error' level.
SlateNextPlugin
Parameters
Toggle a block element.
Toggle a mark on the selected text.
HtmlPlugin
Parameters
Deserialize HTML content into Slate nodes.
ReactPlugin
Parameters
Reset the editor state while maintaining focus if the editor was focused.
PlateApiPlugin
Parameters
Redecorate the editor. This method should be overridden for proper functionality.
Parameters
Replace the editor value. See Controlled Value for more information.