Resolved positions

I always get tripped by resolved positions and wanted a second pair of eyes in validating my understanding.


Above is an XML simplification of a prosemirror node, where {} is the cursor and A,B,C,D correspond to flat numerical token positions.

Is the following interpretation correct of the resolve position methods, assuming depth d corresponds to NODE:

  • start(d): B
  • end(d): C
  • before(d): A
  • after(d): D

Help verifying correcting the above is much appreciated :slight_smile:

Yes, that looks right.

1 Like