Skip to main content


The current text node being edited, if any, and the text currently being selected within that text node.

Supported On:


selectedTextRange: { node: TextNode; start: number; end: number } | null


This property will return null if there is no text node being edited. Setting this property to a node will enter text edit mode on that node. Leaving text edit mode will set this value to null.

When start == end, it means that no characters is currently selected -- i.e., there is just a cursor.

Changing selectedTextRange will trigger a selectionchanged message.

On this page