Expands the range 1 unit in the given direction If the range is expandable in the given direction, always returns a non-collapsed range.
If units is > 0, the range is extended to the right, otherwise range is extended to the left.
Moves this range 1 unit in the given direction.
If the range is collapsed, returns a collapsed range shifted by 1 unit,
otherwise collapses this range to the position at the direction
end of the range.
Always returns a collapsed range.
Static
blankStatic
createShorthand to create a new range from a section(s) and offset(s). When given only a head section and offset, creates a collapsed range.
Optional
tailSection: default = headSectionOptional
tailOffset: number = headOffsetOptional
direction: Option<Direction> = nullGenerated using TypeDoc
A logical range of a Post. Usually an instance of Range will be read from the range property, but it may be useful to instantiate a range directly when programmatically modifying a Post.