I’ve got a less than optimal way of getting the current text from the document by drilling down into lots of content nodes. I do however have my current location:
const location = view.state.doc.resolve(
view.state.selection.$head.pos
);
But nothing super useful in there, besides pos. What is the best way to get text from the node at the current position?
I’ve been reading the docs for a while, but just dead ends so far.