Get highlights working on pure JS implementation #719
-
I recently updated It looks like This is what I was returning previously: return html `<a class="aa-link" href="/docs${item.url}${anchorLink}">
<p class="aa-title" >${highlightHit({hit: item, attribute: 'title'})}</h3>
<p class="aa-heading">${item.headings.join(' >')}</p>
<p class="aa-content">${highlightHit({hit: item, attribute: 'content'})}</p></a>
`; Is there a way to re-enable highlighting with Javascript? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can check how |
Beta Was this translation helpful? Give feedback.
You can check how
highlightHit
was implemented prior to the component architecture, and copy the code in your project: https://github.com/algolia/autocomplete/blob/741e7cc79803c2dd1317d6403d44978fca0cfb74/packages/autocomplete-js/src/highlight.ts