Docs
Plate Editor

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

Collapse all

    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.

    • Default: false

    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

Collapse all

    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

Collapse all

    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

Collapse all

    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

Collapse all

    Update the global Plate state.

Core Plugin APIs

DebugPlugin

Parameters

Collapse all

    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

Collapse all

    Toggle a block element.

    Toggle a mark on the selected text.

HtmlPlugin

Parameters

Collapse all

    Deserialize HTML content into Slate nodes.

ReactPlugin

Parameters

Collapse all

    Reset the editor state while maintaining focus if the editor was focused.

PlateApiPlugin

Parameters

Collapse all

    Redecorate the editor. This method should be overridden for proper functionality.

Parameters

Collapse all

    Replace the editor value. See Controlled Value for more information.