findAndReplaceDOMText icon indicating copy to clipboard operation
findAndReplaceDOMText copied to clipboard

Replacement does not replace with HTML properly

Open barrychapman opened this issue 9 years ago • 2 comments

When doing a replacement - and using some HTML as the replacement text - the text appears to be replaced with entities, instead of actual html.

Is this by design? Is there a workaround?

barrychapman avatar Jun 12 '16 14:06 barrychapman

This is by design. To replace DOM with DOM/HTML, you can return a DOM node from the replace function. E.g. https://jsfiddle.net/z7Lkw758/

padolsey avatar Jun 12 '16 15:06 padolsey

Is there a way to find/replace HTML text, say a phone number like

a href="tel:2223334444"

and replace the phone number for something else?

onyx4 avatar Mar 19 '18 07:03 onyx4