Wrap a <span>
around them, and use CSS to highlight spans with its class.
domElement.innerHTML = domElemnt.innerHTML.replace(/l+/g, '<span class="highlight">$&</span>');
1
solved Highlight Text – Native Javascript [closed]
Wrap a <span>
around them, and use CSS to highlight spans with its class.
domElement.innerHTML = domElemnt.innerHTML.replace(/l+/g, '<span class="highlight">$&</span>');
1
solved Highlight Text – Native Javascript [closed]