Range
Range objects are a set of points that refer to a specific span of a Slate document. They can define a span inside a single node or they can span across multiple nodes. The editor's selection is stored as a range.
Get the start and end points of a range, in the order in which they appear in the document.
Options: {reverse?: boolean}
Get the end point of a range.
Get the intersection of one range with another.
Iterate through all the point entries in a range.
Get the start point of a range
Check some attribute of a Range. Always returns a boolean.
Check if a range is exactly equal to another.
Check if a range includes a path, a point, or part of another range.
For clarity the definition of includes can mean partially includes. Another way to describe this is if one Range intersectns the other Range.
Check if a range is backward, meaning that its anchor point appears after its focus point in the document.
Check if a range is collapsed, meaning that both its anchor and focus points refer to the exact same position in the document.
Check if a range is expanded. This is the opposite of Range.isCollapsed and is provided for legibility.
Check if a range is forward. This is the opposite of Range.isBackward and is provided for legibility.
Check if a value implements the Range interface.
Transform a range by an op.
Options: {affinity: 'forward' | 'backward' | 'outward' | 'inward' | null}