Skip to content

Feature request: Update docs for connectHits to support preferred highlighting method #6408

Answered by Haroenv
sgilberg asked this question in Ideas
Discussion options

You must be logged in to vote

Good point, this is indeed not yet documented. I'm finding a place to document it now. In the mean time you can already look at how the example using connectInfiniteHits is changed here: #6410 (code in a clean way visible here: https://github.com/algolia/instantsearch/blob/1f0bc01b598ac9ce613d68f7dcc595f8f03b3744/examples/js/media/src/widgets/Articles.ts)

The previous highlight and snippet helper never were safe as they were still passed to innerHTML. Using htm as inside InstantSearch works much better!

Hope that helps!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sgilberg
Comment options

Answer selected by sgilberg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants