API
Location Types
Point
6min
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 } point docid\ z6qvtbkyriw1xpahva15zpoint docid\ z6qvtbkyriw1xpahva15zpoint docid\ z6qvtbkyriw1xpahva15zpoint docid\ z6qvtbkyriw1xpahva15z 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}
🤔
Have a question?
Our super-smart AI,knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.