ReadonlyfromThe lower boundary of the range.
ReadonlytoThe upper boundary of the range.
The anchor of the range—the side that doesn't move when you extend it.
If this is a cursor that is explicitly associated with the character on one of its sides, this returns the side. -1 means the character before its position, 1 the character after, and 0 means no association.
The bidirectional text level associated with this cursor, if any.
True when anchor and head are at the same position.
The goal column (stored vertical offset) associated with a cursor. This is used to preserve the vertical position when moving across lines of different length.
The head of the range, which is moved when the range is extended.
Compare this range to another range.
OptionalincludeAssoc: booleanExtend this range to cover at least from to to.
Optionalto: numberOptionalassoc: numberMap this range through a change, producing a valid range in the updated document.
Optionalassoc: numberReturn a JSON-serializable object representing the range.
StaticfromConvert a JSON representation of a range to a SelectionRange
instance.
A single selection range. When
allowMultipleSelectionsis enabled, a selection may hold multiple ranges. By default, selections hold exactly one range.