-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How could I just highlight the exat word? #22
Comments
For this you may save the searchKey into state using setState and pass this searchkey to the searchWords props of Highlighter like this example below: This is your text input to enter the search keyword: And your Highlighter component would look like this |
@MohiniGupta04 I'm still not clear how your comment resolves the issue @ramisalem described. I just found this package but I only want to try and highlight an exact match, not partial matches within a longer word... Any solutions? |
I just figured out how accomplish using the code below. (I'm using lodash)
|
Hi, thanks for such an awesome package, I am looking for a way that I could highlight the exact word in the searchWords property, for example, the value of the textToHighlight is "form and the searchWords is for what if do not want to highlight the first three letters in the text but I want to highlight the searchWords values only and only if it comes as exact as it is in searchWords
thanks in advance
The text was updated successfully, but these errors were encountered: