Hi people, I need to get the closest node of a particular type from a known position.
So let’s say I have the following nodes
image abc paragraph(1) paragraph(2)
I need to know from both paragraph which the closest abc node is in order to perform certain logic
So I was planning to loop recursively using nodeBefore method until I found the abc node, but just wondering if there is a better way.