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