Skip to content
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 query matches found in note and note title #26

Open
danielgolden opened this issue Jan 28, 2019 · 1 comment
Open

Highlight search query matches found in note and note title #26

danielgolden opened this issue Jan 28, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request Idea Could be cool, but not sure I'll do it

Comments

@danielgolden
Copy link
Owner

danielgolden commented Jan 28, 2019

This issue is a result of splitting #6 into 2 separate issues:


This would be helpful for specifying how the search query is a match for a given note.

@danielgolden danielgolden added enhancement New feature or request Idea Could be cool, but not sure I'll do it labels Jan 28, 2019
@danielgolden danielgolden self-assigned this Jan 28, 2019
@danielgolden
Copy link
Owner Author

Heres's what I think this is going to require:

highlight note contents query matches

  1. use div with contentEditable attribute instead of using a textarea
  2. regex matches for:
    1. select the space before query match (already accomplished this today)
    2. select the space after the query match
  3. replace both of those matches with the open and closing tag of an element (respectively) you can use to attach classes to so you can style them as highlights.

Highlight note title

  • I think I'm going to need to switch back to using a custom notes list to make this happen. Specifically move away from using a <select> element to display the note titles and build my own. Because <option> elements cannot have styled children.

danielgolden added a commit that referenced this issue Jan 28, 2019
but it just hit me that I have more important
issues I should be investing my time into
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Idea Could be cool, but not sure I'll do it
Projects
None yet
Development

No branches or pull requests

1 participant