How to get position of text where the mouse clicks

Here are some references: