阅读背景:

当插入符号位于特定div / span / a标记内时,以及当插入符号离开标记时,触发事件

来源:互联网 

The idea is this - There is a contenteditable element with some text in it. Am trying to build out a tagging mechanism (kind of like twitter's people tagging when you type '@'). Whenever a user types '@', it shows up a popover with suggestions and filters when they continue typing. Until here it's easy and I have got it figured out. The problem comes when I need to show the popover if/only if the caret is over the element containing the tag.The idea is this - There is a contenteditable e




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: