Skip to content
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

Feature request: multiple terms with different marks? #34

Open
LaughingBubba opened this issue Jan 22, 2017 · 0 comments
Open

Feature request: multiple terms with different marks? #34

LaughingBubba opened this issue Jan 22, 2017 · 0 comments

Comments

@LaughingBubba
Copy link

sooo ... an alternate syntax that goes something like this :

let searchMarks = {[
  {search:"abc", matchElement: "markOrange"},
  {search:"def", matchElement: "markBlue"},
  {search:"ghi", matchElement: "markYellow"},
]}

<Highlight searchMarks={searchMarks}>{sometext}</Highlight>

The requirement is to be able to use multiple search terms and define a separate highlight for each so different highlight colours can be used for each term.

I did have a go at nesting a Highlight tag with in itself (but with a different search and mark) but only the inner most Highlight seems to get executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants