selectedTextRange
The current text node being edited, if any, and the text currently being selected within that text node.
Supported on:
Signature
selectedTextRange: { node: TextNode; start: number; end: number } | null
Remarks
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 selectionchange message.