Find in note Trilium widget to replace the crappy ctrl+f search.
sandbox.-.Trilium.Notes.2022-04-22.15-41-19_rescaled.mp4
- Works on code and text notes.
- Whole word and case sensitive flags.
- Hardcoded keys:
- F3/ctrl+f, to start a search (you will need to disable ctrl+f shortcut in Trilium shortcut dialog box so the widget can receive it).
- F3/enter shift+f3/shift+enter to go to the next/prev occurrence
- esc or click on note to end the search and go back to the note
- Doesn't work on readonly notes, no firm plans to make it work there.
- Tested on Trilium Desktop 0.50.3
- Create a code note of type JS Frontend with the contents of FindWidget.js
- Set the owned attributes (alt-a) to #widget
- Set the owned attributes of any note you don't want to enable finding to #noFindWidget
- Disable Ctrl+f shorcut in Trilium options
- noFindWidget: Set on the text notes you don't want to show the ToC for
- findWidgetDelayMillis: Number of milliseconds to wait from the time a key is pressed until the search is performed. Prevents stalls typing the first chars search word in long notes. Set to negative to force enter to be pressed in order to search. Default is 250
- debugLevel: Enable output to the javascript console, default is "info"
(without quotes):
- "error" no javascript console output
- "warn" enable warn statements to the javascript console
- "info" enable info and previous levels statements to the javascript console
- "log" enable log and previous levels statements to the javascript console
- "debug" enable debug and previous levels statements to the javascript console
- Refactoring, code cleanup
- Regexp search.
- Find & Replace