API
Location Types
Point
6 min
point objects refer to a specific location in a text node in a slate document its path refers to the location of the node in the tree, and its offset refers to distance into the node's string of text points may only refer to text nodes interface point { path path offset number } docid\ a0e2bp86wmzdiv yjdm6m docid\ a0e2bp86wmzdiv yjdm6m docid\ a0e2bp86wmzdiv yjdm6m docid\ a0e2bp86wmzdiv yjdm6m static methods retrieval methods point compare(point point, another point) 1 | 0 | 1 compare a point to another , returning an integer indicating whether the point was before, at or after the other check methods point isafter(point point, another point) boolean check if a point is after another point isbefore(point point, another point) boolean check if a point is before another point equals(point point, another point) boolean check if a point is exactly equal to another point ispoint(value any) value is point check if a value implements the point interface transform methods point transform(point point, op operation, options?) point | null transform a point by an op options {affinity? 'forward' | 'backward' | null}
