Hi John,
I am working on some inhouse project. I am trying to simulate a highlighter which will highlight the user selected text once they press a button after the text selection.
The objective is to make the selected text different from other text (highlighting).
I've done this in IE with the following code
Code:
theSelection = document.selection.createRange().htmlText;
document.selection.createRange().pasteHTML("<span style='background-color: yellow;'>" + theSelection + "</span>");
The above code is an IE specific one.
Bookmarks