170
rated 0 times
[
174]
[
4]
/ answers: 1 / hits: 29476
/ 15 Years ago, mon, october 19, 2009, 12:00:00
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.
More From » dom