Skip to content

Enable highlighting in HTML content#21

Open
vincent-psarga wants to merge 1 commit intobvaughn:masterfrom
vincent-psarga:master
Open

Enable highlighting in HTML content#21
vincent-psarga wants to merge 1 commit intobvaughn:masterfrom
vincent-psarga:master

Conversation

@vincent-psarga
Copy link

I'm trying to integrate react-highlight-words in a page where highlighting needs to be done on rendered HTML from one markdown (the project its Cucumber new HTML report).

In this PR, I've added a new parameter htmlText to findAll that tells if the content is HTML. It will not try to highlight the HTML markup, but only the text inside.

I've added some test displaying the original behaviour and also the one when the flag is set. I've also updated the documentation.

Another PR should follow soon on react-highlight-words enabling raw HTML to be highlighted.

vincent-psarga added a commit to cucumber/common that referenced this pull request May 27, 2020
Also enable highlighting dangerouslySetHtml in order to highlight in Markdown components.
By default, it will not accept HTML input (or at least will escape it)

[PR#21](bvaughn/highlight-words-core#21)
cukebot pushed a commit to cucumber/react-components that referenced this pull request Jun 15, 2020
Also enable highlighting dangerouslySetHtml in order to highlight in Markdown components.
By default, it will not accept HTML input (or at least will escape it)

[PR#21](bvaughn/highlight-words-core#21)
aslakhellesoy pushed a commit to cucumber/react-components that referenced this pull request Jan 7, 2022
Also enable highlighting dangerouslySetHtml in order to highlight in Markdown components.
By default, it will not accept HTML input (or at least will escape it)

[PR#21](bvaughn/highlight-words-core#21)
@dpasqualin-thesuite
Copy link

dpasqualin-thesuite commented Nov 14, 2024

I'm trying to do the same and ended up in this PR, why was it never merged?
I created an issue #29 about it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants