Skip to content

Type Editor


Type Editor / @type-editor/selection-util / sync-node-selection

sync-node-selection

Functions

FunctionDescription

syncNodeSelection

Synchronizes node selection state between ProseMirror and the DOM.

When a node is selected (as opposed to text selection), this function ensures that the appropriate view descriptor is marked as selected, and any previously selected node is deselected. This allows node views to apply custom styling or behavior when selected.