javascript - Getting selected text position -
currently i'm getting selected text in browser doing this:
window.getselection();
now need show tooltip above text when pressing custom key(note mouse not on text anymore), in order need absolute position of selected text.
is there way that, maybe wrapping text inside tag , getting offsets?
any idea?
ps: have work chrome, not browsers.
ps2: sorry crappy english.
the easiest way insert temporary marker element @ start or end of selection , position. i've demonstrated how before on stack overflow: how can position element next user text selection?
Comments
Post a Comment