{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "api-core-docs",
  "title": "Plate Core",
  "description": "API reference for @platejs/core.",
  "files": [
    {
      "path": "../../content/docs/api/core.mdx",
      "content": "---\ntitle: Plate Core\ndescription: API reference for @platejs/core.\n---\n\n## API\n\n### `createPlateEditor`\n\nGenerates a new instance of a `PlateEditor`, initialized with a set of plugins and their configurations.\n\n<API name=\"createPlateEditor\">\n<APIOptions type=\"CreatePlateEditorOptions\">\n  <APIItem name=\"id\" type=\"any\" optional>\n    Unique identifier for the editor.\n  </APIItem>\n  <APIItem name=\"editor\" type=\"E\" optional>\n    Initial editor without `withPlate`.\n  </APIItem>\n  <APIItem name=\"plugins\" type=\"P[]\" optional>\n    An array of editor plugins.\n  </APIItem>\n  <APIItem name=\"value\" type=\"V | string | ((editor: PlateEditor) => V | Promise<V>)\" optional>\n    Initial value of the editor. Can be:\n    - A static value array\n    - An HTML string to be deserialized\n    - A function that returns a value (can be async)\n  </APIItem>\n  <APIItem name=\"autoSelect\" type=\"'end' | 'start' | boolean\" optional>\n    Select the editor after initialization.\n    - **Default:** `false`\n    - `true` | 'end': Select the end of the editor\n    - `false`: Do not select anything\n    - `'start'`: Select the start of the editor\n  </APIItem>\n  <APIItem name=\"onReady\" type=\"(ctx: { editor: PlateEditor; isAsync: boolean; value: V }) => void\" optional>\n    Callback called when the editor initialization completes. The `isAsync` flag indicates whether the value was loaded asynchronously.\n  </APIItem>\n  <APIItem name=\"maxLength\" type=\"number\" optional>\n    Specifies the maximum number of characters allowed in the editor.\n  </APIItem>\n  <APIItem name=\"navigationFeedback\" type=\"object | boolean\" optional>\n    Configuration for the built-in navigation feedback plugin.\n    <APISubList>\n      <APISubListItem parent=\"navigationFeedback\" name=\"duration\" type=\"number\" optional>\n        Default flash duration in milliseconds.\n        - **Default:** `1600`\n      </APISubListItem>\n    </APISubList>\n  </APIItem>\n  <APIItem name=\"nodeId\" type=\"object | boolean\" optional>\n    Configuration for automatic node ID generation and management.\n    <APISubList>\n      <APISubListItem parent=\"nodeId\" name=\"disableInsertOverrides\" type=\"boolean\" optional>\n        Disable using existing IDs when inserting nodes.\n        - When `false`: Keeps existing IDs if they don't exist in document\n        - When `true`: Always generates new IDs\n        - **Default:** `false`\n      </APISubListItem>\n      <APISubListItem parent=\"nodeId\" name=\"filterInline\" type=\"boolean\" optional>\n        Filter inline Element nodes from receiving IDs.\n        - **Default:** `true`\n      </APISubListItem>\n      <APISubListItem parent=\"nodeId\" name=\"filterText\" type=\"boolean\" optional>\n        Filter Text nodes from receiving IDs.\n        - **Default:** `true`\n      </APISubListItem>\n      <APISubListItem parent=\"nodeId\" name=\"idCreator\" type=\"() => any\" optional>\n        Function to generate unique IDs.\n        - **Default:** `() => nanoid(10)`\n      </APISubListItem>\n      <APISubListItem parent=\"nodeId\" name=\"idKey\" type=\"string\" optional>\n        Property key used to store node IDs.\n        - **Default:** `'id'`\n      </APISubListItem>\n      <APISubListItem parent=\"nodeId\" name=\"initialValueIds\" type=\"false | 'always' | 'if-needed'\" optional>\n        Controls how missing IDs are assigned in the initial value.\n        - When `'if-needed'`: Only checks the first and last top-level nodes\n        - When `'always'`: Walks the whole initial value and fills missing IDs\n        - When `false`: Skips initial-value ID assignment\n        - **Default:** `'if-needed'`\n      </APISubListItem>\n      <APISubListItem parent=\"nodeId\" name=\"normalizeInitialValue\" type=\"boolean | null\" optional>\n        Deprecated alias for `initialValueIds`.\n        - When `false`: Same as `'if-needed'`\n        - When `true`: Same as `'always'`\n        - When `null`: Same as `false`\n      </APISubListItem>\n      <APISubListItem parent=\"nodeId\" name=\"reuseId\" type=\"boolean\" optional>\n        Reuse IDs on undo/redo and copy/paste.\n        - When `true`: Keeps IDs if they don't exist in document\n        - When `false`: Always generates new IDs (safer across documents)\n        - **Default:** `false`\n      </APISubListItem>\n      <APISubListItem parent=\"nodeId\" name=\"allow\" type=\"string[]\" optional>\n        Node types that should receive IDs.\n      </APISubListItem>\n      <APISubListItem parent=\"nodeId\" name=\"exclude\" type=\"string[]\" optional>\n        Node types that should not receive IDs.\n      </APISubListItem>\n      <APISubListItem parent=\"nodeId\" name=\"filter\" type=\"(node: NodeEntry) => boolean\" optional>\n        Custom filter function for nodes that should receive IDs.\n        - **Default:** `() => true`\n      </APISubListItem>\n    </APISubList>\n  </APIItem>\n  <APIItem name=\"chunking\" type=\"object | boolean\" optional>\n    Configure Slate's chunking optimization, which reduces latency while typing. Set to `false` to disable. [Learn more about chunking.](https://docs.slatejs.org/walkthroughs/09-performance)\n    <APISubList>\n      <APISubListItem parent=\"chunking\" name=\"chunkSize\" type=\"number\" optional>\n        The number of blocks per chunk.\n        - **Default:** 1000\n      </APISubListItem>\n      <APISubListItem parent=\"chunking\" name=\"contentVisibilityAuto\" type=\"boolean\" optional>\n        Whether to render each chunk as a DOM element with `content-visibility: auto`, which optimizes DOM painting. When set to `false`, no DOM element will be rendered for each chunk.\n        - **Default:** `true`\n      </APISubListItem>\n      <APISubListItem parent=\"chunking\" name=\"query\" type=\"(ancestor: Ancestor) => boolean\" optional>\n        Determine which ancestors should have chunking applied to their children. Only blocks containing other blocks can have chunking applied.\n        - **Default:** `NodeApi.isEditor`\n      </APISubListItem>\n    </APISubList>\n  </APIItem>\n  <APIItem name=\"selection\" type=\"TSelection\" optional>\n    Initial selection for the editor.\n  </APIItem>\n  <APIItem name=\"shouldNormalizeEditor\" type=\"boolean\" optional>\n    When `true`, it will normalize the initial `value` passed to the `editor`.\n    - **Default:** `false`\n  </APIItem>\n  <APIItem name=\"rootPlugin\" type=\"(plugin: AnyPlatePlugin) => AnyPlatePlugin\" optional>\n    Function to configure the root plugin.\n  </APIItem>\n  <APIItem name=\"api\" type=\"object\" optional>\n    API methods for the editor.\n  </APIItem>\n  <APIItem name=\"decorate\" type=\"function\" optional>\n    Decoration function for the editor.\n  </APIItem>\n  <APIItem name=\"extendEditor\" type=\"function\" optional>\n    Function to extend the editor.\n  </APIItem>\n  <APIItem name=\"handlers\" type=\"object\" optional>\n    Event handlers for the editor.\n  </APIItem>\n  <APIItem name=\"inject\" type=\"object\" optional>\n    Injection configuration for the editor.\n  </APIItem>\n  <APIItem name=\"transformInitialValue\" type=\"function\" optional>\n    Function to transform the initial value before the editor is ready.\n  </APIItem>\n  <APIItem name=\"normalizeInitialValue\" type=\"function\" optional>\n    Deprecated alias for `transformInitialValue`. Legacy hooks may either\n    mutate `value` in place or return the next value.\n  </APIItem>\n  <APIItem name=\"options\" type=\"object\" optional>\n    Additional options for the editor.\n  </APIItem>\n  <APIItem name=\"override\" type=\"object\" optional>\n    Override configuration for the editor.\n  </APIItem>\n  <APIItem name=\"priority\" type=\"number\" optional>\n    Priority of the editor plugin.\n  </APIItem>\n  <APIItem name=\"readOnly\" type=\"boolean\" optional>\n    Editor read-only initial state. For dynamic value, use\n    `Plate.readOnly` prop.\n  </APIItem>\n  <APIItem name=\"render\" type=\"object\" optional>\n    Render functions for the editor.\n  </APIItem>\n  <APIItem name=\"shortcuts\" type=\"object\" optional>\n    Keyboard shortcuts for the editor.\n  </APIItem>\n  <APIItem name=\"transforms\" type=\"object\" optional>\n    Transform functions for the editor.\n  </APIItem>\n  <APIItem name=\"useHooks\" type=\"function\" optional>\n    Hook to use with the editor.\n  </APIItem>\n</APIOptions>\n\n<APIReturns type=\"PlateEditor\">\n  An editor instance with plugins and config applied.\n</APIReturns>\n</API>\n\nFor more details on editor configuration, refer to the [Editor Configuration](/docs/editor) guide.\n\n### `createPlatePlugin`\n\nCreates a new Plate plugin with the given configuration, supporting extension, nested plugin manipulation, and runtime configuration.\n\n<API name=\"createPlatePlugin\">\n<APIParameters>\n  <APIItem name=\"config\" type=\"PlatePluginConfig | ((editor: PlateEditor) => PlatePluginConfig)\">\n    The configuration object for the plugin, or a function that returns the configuration. If a function is provided, it will be executed when the plugin is resolved with the editor.\n\n    For details on the `PlatePluginConfig` type, refer to the [PlatePlugin API](/docs/api/core/plate-plugin#plugin-properties).\n  </APIItem>\n</APIParameters>\n\n<APIReturns type=\"PlatePlugin\">\n  A new plugin instance.\n</APIReturns>\n</API>\n\n### `createTPlatePlugin`\n\nExplicitly typed version of `createPlatePlugin`.\n\n<API name=\"createTPlatePlugin\">\n<APIParameters>\n  <APIItem name=\"config\" type=\"TPlatePluginConfig<C> | ((editor: PlateEditor) => TPlatePluginConfig<C>)\">\n    The configuration object for the plugin, or a function that returns the configuration. This version requires an explicit type parameter `C` extending `AnyPluginConfig`.\n\n    For details on the `TPlatePluginConfig` type, refer to the [PlatePlugin API](/docs/api/core/plate-plugin#plugin-properties).\n  </APIItem>\n</APIParameters>\n\n<APIReturns type=\"PlatePlugin<C>\">\n  A new plugin instance.\n</APIReturns>\n</API>\n\n### `toPlatePlugin`\n\nExtends a SlatePlugin to create a React PlatePlugin.\n\n<API name=\"toPlatePlugin\">\n<APIParameters>\n  <APIItem name=\"basePlugin\" type=\"SlatePlugin\">\n    The base SlatePlugin to be extended.\n  </APIItem>\n  <APIItem name=\"extendConfig\" type=\"PlatePluginConfig | ((ctx: PlatePluginContext<C>) => PlatePluginConfig)\" optional>\n    A function or object that provides the extension configuration. If a function, it receives the plugin context and should return a partial PlatePlugin. If an object, it should be a partial PlatePlugin configuration.\n  </APIItem>\n</APIParameters>\n\n<APIReturns type=\"PlatePlugin\">\n  A new plugin instance that combines the base SlatePlugin functionality with React-specific features defined in the extension configuration.\n</APIReturns>\n</API>\n\n### `toTPlatePlugin`\n\nExplicitly typed version of `toPlatePlugin`.\n\n<API name=\"toTPlatePlugin\">\n<APIParameters>\n  <APIItem name=\"basePlugin\" type=\"SlatePlugin<TContext>\">\n    The base SlatePlugin to be extended.\n  </APIItem>\n  <APIItem name=\"extendConfig\" type=\"ExtendPluginConfig<C> | ((ctx: PlatePluginContext<TContext>) => ExtendPluginConfig<C>)\" optional>\n    A function or object that provides the extension configuration. This version requires explicit type parameters for both the base plugin configuration (`TContext`) and the extension configuration (`C`).\n  </APIItem>\n</APIParameters>\n\n<APIReturns type=\"PlatePlugin<C>\">\n  A new plugin instance with precise type control.\n</APIReturns>\n</API>\n\n### `usePlateEditor`\n\nCreates a memoized Plate editor for React components.\n\n<API name=\"usePlateEditor\">\n<APIParameters>\n  <APIItem name=\"options\" type=\"CreatePlateEditorOptions & { enabled?: boolean; onReady?: (ctx: { editor: PlateEditor; isAsync: boolean; value: V }) => void }\" optional>\n    Configuration options for creating the Plate editor. All options from `createPlateEditor` are supported, plus:\n    <APISubList>\n      <APISubListItem parent=\"options\" name=\"enabled\" type=\"boolean\" optional>\n        Whether the editor should be created. When `false`, returns `null`.\n        - **Default:** `true`\n      </APISubListItem>\n      <APISubListItem parent=\"options\" name=\"onReady\" type=\"(ctx: { editor: PlateEditor; isAsync: boolean; value: V }) => void\" optional>\n        Callback called when the editor initialization completes. The `isAsync` flag indicates whether the value was loaded asynchronously.\n      </APISubListItem>\n    </APISubList>\n  </APIItem>\n  <APIItem name=\"deps\" type=\"React.DependencyList\" optional>\n    Additional dependencies for the useMemo hook.\n    - **Default:** `[]`\n  </APIItem>\n</APIParameters>\n\n<APIReturns type=\"PlateEditor | null\">\n  A memoized Plate editor instance. Returns `null` if `enabled` is `false`.\n</APIReturns>\n</API>\n\n### `useEditorContainerRef`\n\n<API name=\"useEditorContainerRef\">\n<APIReturns type=\"React.RefObject<HTMLDivElement>\">\n  The editor container DOM reference.\n</APIReturns>\n</API>\n\n### `useEditorScrollRef`\n\n<API name=\"useEditorScrollRef\">\n<APIReturns type=\"React.RefObject<HTMLDivElement>\">\n  The editor scroll container DOM reference.\n</APIReturns>\n</API>\n\n### `useScrollRef`\n\n<API name=\"useScrollRef\">\n<APIReturns type=\"React.RefObject<HTMLDivElement>\">\nThe editor scroll container reference. Returns the scroll ref if it exists, otherwise returns the container ref.\n</APIReturns>\n</API>\n\n### `useEditorPlugin`\n\nGet editor and plugin context.\n\n<API name=\"useEditorPlugin\">\n<APIParameters>\n  <APIItem name=\"p\" type=\"WithRequiredKey<P>\">\n    The plugin or plugin configuration with a required key.\n  </APIItem>\n</APIParameters>\n\n<APIReturns type=\"PlatePluginContext\">\n  <APIItem name=\"editor\" type=\"PlateEditor\">\n      The current editor instance.\n  </APIItem>\n  <APIItem name=\"plugin\" type=\"PlatePlugin\">\n      The plugin instance.\n  </APIItem>\n  <APIItem name=\"getOption\" type=\"function\">\n      Function to get a specific option value.\n  </APIItem>\n  <APIItem name=\"getOptions\" type=\"function\">\n      Function to get all options for the plugin.\n  </APIItem>\n  <APIItem name=\"setOption\" type=\"function\">\n      Function to set a specific option value.\n  </APIItem>\n  <APIItem name=\"setOptions\" type=\"function\">\n      Function to set multiple options.\n  </APIItem>\n  <APIItem name=\"store\" type=\"PlateStore\">\n      The Plate store for the editor.\n  </APIItem>\n</APIReturns>\n</API>\n\n### `useEditorRef`\n\nGet the Plate editor reference without re-rendering. The returned editor object is enhanced with a `store` property that provides access to the Plate store.\n\n<API name=\"useEditorRef\">\n<APIParameters>\n  <APIItem name=\"id\" type=\"string\" optional>\n    Editor ID used for accessing nested editors. When not provided, returns the closest editor instance in the React tree. Only use this parameter when working with nested editors to target a specific scope.\n  </APIItem>\n</APIParameters>\n\n<APIReturns type=\"PlateEditor & { store: PlateStore }\">\n  The editor reference with attached store.\n</APIReturns>\n</API>\n\n### `useEditorSelector`\n\nSubscribe to a specific property of the editor.\n\n<API name=\"useEditorSelector\">\n<APIParameters>\n  <APIItem name=\"selector\" type=\"(editor: PlateEditor<V>, prev?: T) => T\">\n    The selector function.\n  </APIItem>\n  <APIItem name=\"deps\" type=\"DependencyList\">\n    The dependency list for the selector function.\n  </APIItem>\n  <APIItem name=\"options\" type=\"UseEditorSelectorOptions<T>\" optional>\n    Options for the selector function.\n  </APIItem>\n</APIParameters>\n\n<APIOptions>\n  <APIItem name=\"id\" type=\"string\" optional>\n    The ID of the plate editor. Useful only when nesting editors. Default is using the closest editor id.\n  </APIItem>\n  <APIItem name=\"equalityFn\" type=\"(a: T, b: T) => boolean\" optional>\n    Equality function to determine whether the result of the selector function has changed. Default is `(a, b) => a === b`.\n  </APIItem>\n</APIOptions>\n\n<APIReturns type=\"T\">\n  The return value of the selector function.\n</APIReturns>\n</API>\n\n### `useEditorState`\n\nGet the Plate editor reference with re-rendering.\n\n<API name=\"useEditorState\">\n<APIParameters>\n  <APIItem name=\"id\" type=\"string\" optional>\n    The ID of the plate editor. Default is using the closest editor id.\n  </APIItem>\n</APIParameters>\n\n<APIReturns type=\"PlateEditor\">\n  The editor reference.\n</APIReturns>\n</API>\n\n### `useEditorComposing`\n\nGet the editor's `composing` state.\n\n<API name=\"useEditorComposing\">\n<APIParameters>\n  <APIItem name=\"id\" type=\"string\" optional>\n    The ID of the plate editor.\n  </APIItem>\n</APIParameters>\n<APIReturns type=\"boolean\">\n  Whether the editor is composing.\n</APIReturns>\n</API>\n\n### `useEditorReadOnly`\n\nGet the editor's `readOnly` state.\n<API name=\"useEditorReadOnly\">\n<APIParameters>\n  <APIItem name=\"id\" type=\"string\" optional>\n    The ID of the plate editor.\n  </APIItem>\n</APIParameters>\n<APIReturns type=\"boolean\">\n  Whether the editor is read-only.\n</APIReturns>\n</API>\n\n### `useEditorMounted`\n\nGet the editor's `isMounted` state.\n\n<API name=\"useEditorMounted\">\n<APIParameters>\n  <APIItem name=\"id\" type=\"string\" optional>\n    The ID of the plate editor.\n  </APIItem>\n</APIParameters>\n<APIReturns type=\"boolean\">\n  Whether the editor is mounted.\n</APIReturns>\n</API>\n\n### `useEditorSelection`\n\nGet the editor's selection. Memoized so it does not re-render if the range is the same.\n\n<API name=\"useEditorSelection\">\n<APIParameters>\n  <APIItem name=\"id\" type=\"string\" optional>\n    The ID of the plate editor.\n  </APIItem>\n</APIParameters>\n<APIReturns type=\"TRange | null\">\nThe current selection in the editor.\n</APIReturns>\n</API>\n\n### `useEditorVersion`\n\nGet the version of the editor value. That version is incremented on each editor change.\n\n<API name=\"useEditorVersion\">\n<APIParameters>\n  <APIItem name=\"id\" type=\"string\" optional>\n    The ID of the plate editor.\n  </APIItem>\n</APIParameters>\n<APIReturns type=\"number\">\nThe current version of the editor value.\n</APIReturns>\n</API>  \n\n### `useSelectionVersion`\n\nGet the version of the editor selection. That version is incremented on each selection change (the range being different).\n\n<API name=\"useSelectionVersion\">\n<APIParameters>\n  <APIItem name=\"id\" type=\"string\" optional>\n    The ID of the plate editor.\n  </APIItem>\n</APIParameters>\n<APIReturns type=\"number\">\nThe current version of the editor selection.\n</APIReturns>\n</API>\n\n### `useSelectionCollapsed`\n\n<API name=\"useSelectionCollapsed\">\n<APIReturns type=\"boolean\">\nWhether the current selection is collapsed.\n</APIReturns>\n</API>\n\n### `useSelectionExpanded`\n\n<API name=\"useSelectionExpanded\">\n<APIReturns type=\"boolean\">\nWhether the current selection is expanded.\n</APIReturns>\n</API>\n\n### `useSelectionWithinBlock`\n\n<API name=\"useSelectionWithinBlock\">\n<APIReturns type=\"boolean\">\nWhether the current selection is within a single block.\n</APIReturns>\n</API>\n\n### `useSelectionAcrossBlocks`\n\n<API name=\"useSelectionAcrossBlocks\">\n<APIReturns type=\"boolean\">\nWhether the current selection spans across multiple blocks.\n</APIReturns>\n</API>\n\n### `useSelectionFragment`\n\nReturns the fragment of the current selection, optionally unwrapping structural nodes.\n\n<API name=\"useSelectionFragment\">\n<APIReturns type=\"TElement[]\">\n  The fragment of the current selection. Returns an empty array if the selection is not expanded or if no fragment is found.\n</APIReturns>\n</API>\n\n### `useSelectionFragmentProp`\n\nReturns a prop value derived from the current selection fragment.\n    \n<API name=\"useSelectionFragmentProp\">\n<APIOptions type=\"GetSelectionFragmentOptions & GetFragmentPropOptions\" optional>\n<APIItem name=\"key\" type=\"string\" optional>\nThe key of the property to extract from each node.\n</APIItem>\n<APIItem name=\"defaultValue\" type=\"string\" optional>\nThe default value to return if no valid prop is found.\n</APIItem>\n<APIItem name=\"getProp\" type=\"(node: TElement | TText) => any\" optional>\nCustom function to extract the prop value from a node.\n</APIItem>\n<APIItem name=\"mode\" type=\"'all' | 'block' | 'text'\" optional>\nDetermines how to traverse the fragment:\n- 'all': Check both block and text nodes\n- 'block': Only check block nodes\n- 'text': Only check text nodes\n  \n- **Default**: `'block'`\n</APIItem>\n</APIOptions>\n\n<APIReturns>\nA value derived from the fragment nodes, or undefined if no consistent value is found across the specified nodes.\n</APIReturns>\n</API>\n\n### `useNodePath`\n\nReturns the path of a node in the editor.\n\n<API name=\"useNodePath\">\n<APIParameters>\n  <APIItem name=\"node\" type=\"TNode\">\n    The node to find the path for.\n  </APIItem>\n</APIParameters>\n\n<APIReturns>\n  A memoized Path array representing the location of the node in the editor's tree structure.\n</APIReturns>\n</API>\n\n### `usePath`\n\nGet the memoized path of the closest element.\n\n<API name=\"usePath\">\n<APIParameters>\n  <APIItem name=\"pluginKey\" type=\"string\" optional>\n    The key of the plugin to get the path for.\n  </APIItem>\n</APIParameters>\n\n<APIReturns>\n  The path of the element, or `undefined` if used outside of a node component's context.\n</APIReturns>\n</API>  \n\n### `usePluginOption`\n\nHook to access plugin options from the plugin store. For usage inside `<Plate>`.\n\n<API name=\"usePluginOption\">\n<APIParameters>\n  <APIItem name=\"plugin\" type=\"PlatePlugin\">\n    The plugin to get options from.\n  </APIItem>\n  <APIItem name=\"key\" type=\"keyof (InferOptions<C> | InferSelectors<C>) | 'state'\">\n    The key of the option or selector to access.\n  </APIItem>\n  <APIItem name=\"...args\" type=\"any[]\" optional>\n    Additional arguments:\n    - For selectors: The selector parameters\n    - Last argument can be an equality function `(a: T, b: T) => boolean`\n  </APIItem>\n</APIParameters>\n\n<APIReturns type=\"T\">\n  The value of the option or selector result:\n  - For 'state': Returns the entire state object\n  - For selector keys: Returns the selector's return value\n  - For option keys: Returns the option value\n</APIReturns>\n\n```tsx\n// Access a simple option\nconst value = usePluginOption(plugin, 'value');\n// Access a selector with parameters\nconst doubleValue = usePluginOption(plugin, 'doubleValue', 2);\n// Access with equality function\nconst value = usePluginOption(plugin, 'value', (a, b) => a === b);\n// Access entire state\nconst state = usePluginOption(plugin, 'state');\n```\n\n</API>\n\n### `useEditorPluginOption`\n\nHook to access plugin options from the plugin store. For usage outside `<Plate>`.\n\n<API name=\"useEditorPluginOption\">\n<APIParameters>\n  <APIItem name=\"editor\" type=\"PlateEditor\">\n    The editor instance.\n  </APIItem>\n  <APIItem name=\"plugin\" type=\"PlatePlugin\">\n    The plugin to get options from.\n  </APIItem>\n  <APIItem name=\"key\" type=\"keyof (InferOptions<C> | InferSelectors<C>) | 'state'\">\n    The key of the option or selector to access.\n  </APIItem>\n  <APIItem name=\"...args\" type=\"any[]\" optional>\n    Additional arguments:\n    - For selectors: The selector parameters\n    - Last argument can be an equality function `(a: T, b: T) => boolean`\n  </APIItem>\n</APIParameters>\n\n<APIReturns type=\"T\">\n  The value of the option or selector result:\n  - For 'state': Returns the entire state object\n  - For selector keys: Returns the selector's return value\n  - For option keys: Returns the option value\n</APIReturns>\n\n```tsx\n// Access a simple option\nconst value = useEditorPluginOption(editor, plugin, 'value');\n// Access a selector with parameters\nconst doubleValue = useEditorPluginOption(editor, plugin, 'doubleValue', 2);\n// Access with equality function\nconst value = useEditorPluginOption(editor, plugin, 'value', (a, b) => a === b);\n// Access entire state\nconst state = useEditorPluginOption(editor, plugin, 'state');\n```\n</API>\n\n\n### `useElement`\n\nGet the element by plugin key.\n\n<API name=\"useElement\">\n<APIParameters>\n  <APIItem name=\"pluginKey\" type=\"string\" optional>\n    The key of the plugin to get the element for.\n    - **Default:** `'element'`\n  </APIItem>\n</APIParameters>\n\n<APIReturns>\n  The element of type `T extends TElement`, or an empty object if used outside of a node component's context.\n</APIReturns>\n</API>\n\n## Core plugins\n\n### `DebugPlugin`\nProvides debugging capabilities with configurable log levels and error handling. \n\nSee [Debugging](/docs/debugging) for more details.\n\n### `SlateExtensionPlugin & SlateReactExtensionPlugin`\nExtend core apis and improve default functionality.\n\n`SlateExtensionPlugin` exposes `editor.api.isElementStateEmpty(element)`. It\nchecks the element's own props, not its text content. By default, only `type`\nand props claimed by plugins through `node.isMetadataProp` are ignored; any other\nprop means the element carries state. `NodeIdPlugin` uses `node.isMetadataProp` for\nthe configured NodeId key.\n\n```tsx\neditor.api.isElementStateEmpty({\n  children: [{ text: '' }],\n  type: 'p',\n}); // true\n\neditor.api.isElementStateEmpty({\n  children: [{ text: '' }],\n  listStyleType: 'disc',\n  type: 'p',\n}); // false\n\nconst CustomMetadataPlugin = createSlatePlugin({\n  key: 'customMetadata',\n  node: {\n    isMetadataProp: ({ key }) => key === 'customId',\n  },\n});\n```\n\n### `DOMPlugin & ReactPlugin`\nIntegrates React-specific functionality into the editor.\n\n### `HistoryPlugin`\nEnables undo and redo functionality for the editor.\n\n### `InlineVoidPlugin`\nManages inline and void elements in the editor.\n\n### `ParserPlugin`\nHandles parsing of content for the editor.\n\n### `LengthPlugin`\nEnforces a maximum length for the editor content.\n\n### `HtmlPlugin`\nEnables HTML serialization and deserialization.\n\n### `AstPlugin`\nHandles Abstract Syntax Tree (AST) operations for the editor.\n\n### `ParagraphPlugin`\nProvides paragraph formatting functionality.\n\n### `EventEditorPlugin`\nManages editor events such as focus and blur.\n\n## Utils\n\n### `isType`\n\nChecks whether a node matches the provided type.\n\n<API name=\"isType\">\n<APIParameters>\n  <APIItem name=\"editor\" type=\"PlateEditor<V>\">\n    The editor in which the node is present.\n  </APIItem>\n  <APIItem name=\"node\" type=\"any\">\n    The node to be checked.\n  </APIItem>\n  <APIItem name=\"key\" type=\"string | string[]\" optional>\n    The type or types to match the node against. Can be a string or an array of\n    strings.\n  </APIItem>\n</APIParameters>\n<APIReturns>\n  A boolean indicating whether the node's type matches the provided type or\n  types.\n</APIReturns>\n</API>\n\n## Components\n\n### `<PlateElement>`\n\nGeneric component for rendering an element.\n\n<API name=\"PlateElement\">\n<APIProps>\n  <APIItem name=\"className\" type=\"string\" optional>\n    The CSS class to apply to the component.\n  </APIItem>\n  <APIItem name=\"editor\" type=\"E\">\n    The editor instance. Also available using `useEditorRef` hook.\n  </APIItem>\n  <APIItem name=\"element\" type=\"TElement\">\n    The element node. Also available using `useElement` hook.\n  </APIItem>\n  <APIItem name=\"path\" type=\"Path\">\n    The path of the element in the editor tree. Also available using `usePath` hook.\n  </APIItem>\n  <APIItem name=\"attributes\" type=\"HTMLAttributes<HTMLElement>\">\n    Attributes of the element to be spread on the top-level element.\n    <APISubList>\n      <APISubListItem parent=\"attributes\" name=\"data-slate-node\" type=\"'element'\">\n        Always set to `'element'`.\n      </APISubListItem>\n      <APISubListItem parent=\"attributes\" name=\"data-slate-inline\" type=\"boolean\" optional />\n      <APISubListItem parent=\"attributes\" name=\"data-slate-void\" type=\"boolean\" optional />\n      <APISubListItem parent=\"attributes\" name=\"dir\" type=\"string\" optional />\n      <APISubListItem parent=\"attributes\" name=\"ref\" type=\"any\">\n        The reference to the element. If using your own reference, merge it with this one.\n      </APISubListItem>\n    </APISubList>\n  </APIItem>\n  <APIItem name=\"children\" type=\"any\">\n    Necessary for rendering the node children.\n  </APIItem>\n  <APIItem name=\"as\" type=\"React.ElementType\" optional>\n    The component type to render as.\n    - **Default:** `'div'`\n  </APIItem>\n</APIProps>\n</API>\n\n### `<PlateLeaf>`\n\nGeneric component for rendering a leaf.\n\n<API name=\"PlateLeaf\">\n<APIProps>\n  <APIItem name=\"className\" type=\"string\" optional>\n    The CSS class to apply to the component.\n  </APIItem>\n  <APIItem name=\"editor\" type=\"E\">\n    The editor context.\n  </APIItem>\n  <APIItem name=\"children\" type=\"any\">\n    Necessary for rendering the node children.\n  </APIItem>\n  <APIItem name=\"leaf\" type=\"TText\">\n    The leaf node.\n  </APIItem>\n  <APIItem name=\"text\" type=\"TText\">\n    The text node.\n  </APIItem>\n  <APIItem name=\"attributes\" type=\"HTMLAttributes<HTMLElement>\">\n    Attributes of the leaf to be spread on the top-level element.\n    <APISubList>\n      <APISubListItem parent=\"attributes\" name=\"data-slate-leaf\" type=\"true\">\n        Always set to `true`.\n      </APISubListItem>\n    </APISubList>\n  </APIItem>\n  <APIItem name=\"as\" type=\"React.ElementType\" optional>\n    The component type to render as.\n    - **Default:** `'span'`\n  </APIItem>\n</APIProps>\n</API>\n\n### `<PlateText>`\n\nGeneric component for rendering text.\n\n<API name=\"PlateText\">\n<APIProps>\n  <APIItem name=\"className\" type=\"string\" optional>\n    The CSS class to apply to the component.\n  </APIItem>\n  <APIItem name=\"text\" type=\"TText\">\n    The text node.\n  </APIItem>\n  <APIItem name=\"attributes\" type=\"HTMLAttributes<HTMLElement>\">\n    Attributes of the text to be spread on the top-level element.\n  </APIItem>\n  <APIItem name=\"children\" type=\"any\">\n    Necessary for rendering the node children.\n  </APIItem>\n  <APIItem name=\"as\" type=\"React.ElementType\" optional>\n    The component type to render as.\n    - **Default:** `'span'`\n  </APIItem>\n</APIProps>\n</API>\n",
      "type": "registry:file",
      "target": "content/docs/plate/api/core.mdx"
    }
  ],
  "type": "registry:file"
}