bvaughn/react-highlight-words

I am unable to display html text in highlighter.

viveksApp opened this issue · 4 comments

I am unable to display html text in highlighter. For e.g. Hi there \n How are you.

@viveksApp I don't see HTML in your example. Is there a chance to provide a sandbox with the issue?

@sergei-startsev Thanks for replying. Here is my link of Sandbox

https://codesandbox.io/s/magical-estrela-wffgyl

In this code i am using html tags like br (line break) and h1, i want they should work as usual html output not as a string.
Thanks in advance for your help

@viveksApp It's by design. react-highlight-words doesn't support markup. Text chunks are passed as children to createElement and React escapes them. Check out https://codesandbox.io/s/dazzling-brattain-gm7xsj.

@sergei-startsev Thanks for replying, the highlighter is very crucial part of upcoming project, as this plugin not supporting the HTML, still it is excellent plugin for highlighting. No worry, i will use this plugin in my some another project.
Thanks for you valuable time .. have a great time