Why does ProseMirror seem one-indexed?

I noticed the first position in the editor is always 1 but if I use $from.before I can get a position of 0, which comes even before the first node.

I’d like to understand why things are this way so I can “think in ProseMirror” better.

Thank you for the phenomenal work on this project.

The guide explains how the indexing works.

1 Like

Oh thanks! I got so deep into the reference I overlooked the guides.