How to obtain the coordinates of the document paragraph node and the upper left corner of the paragraph node based on the coordinates of the mouse?

How to obtain the coordinates of the document paragraph node and the upper left corner of the paragraph node based on the coordinates of the mouse? The current mouse position may be at the child node. How to find the parent node and obtain the upper left corner coordinates of the node