innerHTML() works great if you need to add a particular bit of text, however if you select text with your cursor innerHTML() will replace it. Is there a way to not replace it but add source code to the selected text.
eg.
'selected text'
becomes
<p class="mystyle">selected text</p>
Where the selected text could be anything?
eg.
'selected text'
becomes
<p class="mystyle">selected text</p>
Where the selected text could be anything?