Skip to content

Type Editor


Type Editor / @type-editor/menu / menu-items/util/is-node-active

menu-items/util/is-node-active

Functions

FunctionDescription

isNodeActive

Checks if a node of a specific type is active at the current selection.

For node selections, checks if the selected node matches the type and attributes. For text selections, checks if the parent node of the cursor position matches the type and attributes (only when the selection end is within the parent).