bvaughn / react-highlight-words

React component to highlight words within a larger body of text
https://bvaughn.github.io/react-highlight-words/
MIT License
2.18k stars 171 forks source link

What if we need the text to be a paragraph tag instead of a span tag? #105

Closed GokulSNath closed 1 year ago

GokulSNath commented 1 year ago

The package creates a span node that wraps around text, right? what if a dev wants the text to be shown inside a "p" tag or any other tag, or if someone wants just the text and nothing else, can we handle this scenario as well?

sergei-startsev commented 1 year ago

@GokulSNath check out highlightTag/unhighlightTag props: https://github.com/bvaughn/react-highlight-words#props