So i did found one really good highlighter. The Problem With this one is that it cant select more then one element.
function changeBGr() {
var sel = window.getSelection ? window.getSelection() : document.selection.createRange(); //FF:IE
if(sel.getRangeAt){ // thats for FF
var range = sel.getRangeAt(0);
var newNode = document.createElement("span");
newNode.setAttribute('style', 'background: red');
range.surroundContents(newNode);
}
else { //and thats for IE7
sel.pasteHTML('<span style="background:red">'+sel.htmlText+'</span>');
}
}
i saw this one too.Change CSS of selected text using Javascript but i could t make it work :S (Yeah i know i noob) Any ideas?