How to roll back highlights which are caused with the below code
if (window.find && window.getSelection) {
var sel = window.getSelection();
sel.collapse(document.body, 0);
document.body.offsetHeight;
if (window.find(text, true)) {
document.execCommand("hiliteColor", false, "YellowGreen");
sel.collapseToEnd();
}
}
How to remove all highlights backcolor, i.e “YellowGreen”. I have seen a post that is related to my question. But the accepted answer is not working. Please somebody look into it and help me.
I found an alternative for this….