开发者

JQuery, Filter by User Selection? Range?

开发者 https://www.devze.com 2023-01-11 06:27 出处:网络
How can I filter my selector by what the user has selected???开发者_运维技巧 I\'m trying to find specific elements inside what the user has highlighted.

How can I filter my selector by what the user has selected???

开发者_运维技巧

I'm trying to find specific elements inside what the user has highlighted.

$('.item', document.selection) ?
$('.item', editor.getSelection().getRanges()[0]) ?


Insert selected text on the page into textarea (jQuery)

This might help. Maybe push it into a hidden element and then have jQuery reference that


Check this out, it will give you the text a user has selected (highlighted) on a page. However, this will not get the DOM structure, but merely the text.

0

精彩评论

暂无评论...
验证码 换一张
取 消