tl;dr
The idea is to allow a user to mark any text and see menu pop-up just next to the selection, with possible actions to apply to the selected text.
I need to position an absolute positioned button next to user's selected text.
I'm binding a mouseup event to the Document, and getting the selected text, but I'm currently out of ideas on how to know where the actual selection is positioned, without wrapping it in some element, because selection of text can be across several elements, and it would mess the structure if I would wrap it.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…