阅读背景:

如何使用JavaScript或jQuery将选定的文本包装到特定标签的网页中?

来源:互联网 

So I need to find a way to wrap the selected (highlighted) text in a web page into a specific tag using javascript or jQuery. I managed to wrap some text into the tag, but the problem is that whenever my selection includes two different paragraphs, the selected text becomes new paragraphs (i.e. everything becomes a mess). This is what I got (I am using the code inside a Google Chrome extension):So I need to find a way to wrap the selected (h




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

分享到: