jquery.selection icon indicating copy to clipboard operation
jquery.selection copied to clipboard

Get selection text with nothing

Open mdtrooper opened this issue 11 years ago • 3 comments

Hi.

I want a method to get the selection text in the page without know if there is a textarea or html text.

Something that:

var text = $(document).selection();

Regards.

mdtrooper avatar Sep 07 '14 01:09 mdtrooper

try $.selection()

pinventado avatar Sep 22 '15 13:09 pinventado

Thanks, I will try your trick.

mdtrooper avatar Sep 22 '15 14:09 mdtrooper

How about $.selection('getPos');? It returns nothing.

ninbit avatar Jan 14 '19 18:01 ninbit