Replies: 2 comments
-
I have the same problem, is there any good solution? |
Beta Was this translation helpful? Give feedback.
-
I'm not sure I understand what you're asking for here. So, focus is typically a Node and anchor is a node, and the offset specifies the position within the children or text content (for TextNodes). The position of an actual node can only really be discussed in terms of it's position in the tree relative to others nodes. For instance, it would have a parent and it might be the Nth child of that (parent) node. Let me know if that doesn't make sense or maybe take a step back and tell me what you're ultimately trying to do. |
Beta Was this translation helpful? Give feedback.
-
I'm looking for a way to get the location of a node in
RangeSelection
format:What's the best way to do that? In this case focus would be the start of the node and anchor would be the end.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions