Node Position

There are a bunch of topics around this notion, yet here I am asking again. The context of my question is a menu item with a “canSomeCommand” where I need to get the ending document position of an arbitrary node. My command UI is hosted by a node view that is for a deeply-rooted parent node of where the cursor sits. I simply want to know: Where is then end of the node where the cursor sits?

I think ResolvedPos.after should be useful there.

Thanks. It is. I was looking for something to walk up the tree using positions. That was the missing piece. I see a cool looking “path” tuple in the ResolvedPos, but it is omitted from the TS spec for the type. An omission that at this point I presume is not accidental.

Yes, path is internal, but the useful information in it should all be available through methods on the class.