danielgolden / nvFresh

A fresh take on the notes app nvALT
6 stars 0 forks source link

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

Open danielgolden opened 5 years ago

danielgolden commented 5 years ago

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 commented 5 years ago

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