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.
sooo ... an alternate syntax that goes something like this :
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.