-
Notifications
You must be signed in to change notification settings - Fork 8
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
Highlight search results #12
Comments
Hello, if this is still available I'd like to take it. |
Sure, go ahead! |
I'm having an issue setting up the project. I cannot login, altough I created the sqlite file under the user.home directory. |
Okay, I got it to work. |
No login issue is described at #24. Maybe, you can support there, too. |
I'll look into it once I'm back home. |
@koppor I've tried several approaches to make a deep copy of the references, but it always copies by reference. 1st search (works perfectly) |
I think, the reference should have an attribute "searchResultHit" (boolean). If true, the CSS class "highlighted" is applied. This CSS class implements some sort of highlighting. - At the beginning of a search. |
Yes, but because we do not want to highlight the whole text we need to actually insert a html tag around the part of the text we want to highlight and assign the css class to that tag. |
Oh, I see. Did you check https://angular.de/artikel/mark-highlight-search-results/ and https://stackoverflow.com/a/52569482/873282 and https://stackoverflow.com/a/46106843/873282. These came out here when I googled |
Thanks for your response. First link looks promising. Haven't been thinking about that approch. I'll try it out tomorrow. |
There is also markjs if you want to highlight on the client side |
Okay, I finished it and made a pull request. Solving this using a custom pipe was way easier than I thought. |
See an example:

The text was updated successfully, but these errors were encountered: