A custom editor interface that extends the base Editor
interface and includes additional properties and methods specific to the Plate library.
Core Properties
API Methods
getApi (plugin: PlatePlugin) => EditorApi & PlatePlugin['api']
Retrieve the typed API for a plugin.
getTransforms (plugin: PlatePlugin) => EditorTransforms & PlatePlugin['transforms']
Get the typed transforms for a plugin.
getPlugin (plugin: PlatePlugin) => PlatePlugin
Retrieve the editor plugin instance by its key or base plugin.
getType (plugin: PlatePlugin) => string
Get the node type associated with a plugin.
init (options: InitOptions) => void
Initialize the editor value, selection, and normalization. Accepts options for auto-select, selection, normalization, value, and an
onReady
callback that provides context on initialization completion.
Option Methods
getOption (plugin: PlatePlugin, optionKey: string) => any
Get a specific option value for a plugin.
getOptions (plugin: PlatePlugin) => any
Get all options for a plugin.
setOption (plugin: PlatePlugin, optionKey: string, value: any) => void
Set a specific option value for a plugin.
setOptions (plugin: PlatePlugin, options: (draft: object) => void | Partial<object>) => void
Set multiple options for a plugin.
getOptionsStore (plugin: PlatePlugin) => any
Get the zustand-x options store for a plugin.
Core Plugin APIs
DebugPlugin
editor.api.debug.log (...args: any[]) => void
Log a message at the 'log' level.
editor.api.debug.info (...args: any[]) => void
Log a message at the 'info' level.
editor.api.debug.warn (...args: any[]) => void
Log a message at the 'warn' level.
editor.api.debug.error (...args: any[]) => void
Log a message at the 'error' level.
HtmlPlugin
ReactPlugin
SlateReactExtensionPlugin
editor.tf.setValue (value: Value) => void
Replace the editor value. See Controlled Value for more information.