Point
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
}
Compare a
point
to another
, returning an integer indicating whether the point was before, at or after the other.Check if a
point
is after another
.Check if a
point
is before another
.Check if a
point
is exactly equal to another
.Check if a
value
implements the Point
interface.Transform a
point
by an op
.Options:
{affinity?: 'forward' | 'backward' | null}
Last modified 1yr ago