사용자 선택 (마우스로 강조 표시)이 특정 요소 내/하위 요소에 있는지 감지 할 수 있습니까?html 요소 내에서 사용자 선택 감지
예 :
<div id="parent">
sdfsdf
<div id="container">
some
<span>content</span>
</div>
sdfsd
</div>
의사 코드 : jQuery를 on() event handler를 사용
if window.getSelection().getRangeAt(0) is a child of #container
return true;
else
return false;
이 던질 수있는 몇 가지 빛 http://stackoverflow.com/questions/6251937/how-to-get-selecteduser-highlighted-text-in-contenteditable-element-and-replac – Shyju
jQuery를 사용하고 있으므로 [Caret] (http://www.jquery-plugin.buss.hk/my-plugins/jquery-caret-plugin)는 매우 멋지다. – mayhewr
아무도 도와 줄 수 있습니까? – Sam