Highlight -- Find and highlight text

My highlight plugin is now on GitHub: Highlight — Find and highlight text.
May, I hope, or may not be useful.

Please note that it is a beta release (1.0.0-beta).
It may contain bugs that I have not discovered yet.

4 Likes

finds and highlights the text entered on the fly in the tiddlers in the story river

what about tiddlers that are in edit mode rather than default view mode?

TiddlyWiki editor vs CodeMirror

2 Likes

could be very useful if it works with tiddlydesktop as ‘crt-f’ is not supported.

Neat plugin - this solves an ergonomic issue with TW, for sure.

I wonder if this functionality can be integrated into the existing search field, rather than a second. That way, users could type into one field and get tiddler results (and onscreen in-story results).

Hi @Jan thank you for sharing. Your highlight plugin works well, and I found the implementation interesting, too. The core Dynannotate plugin does some similar things, but relies on older browser APIs and the implementation is perhaps less elegant.

1 Like

Very interesting, but I do get a RSOD – See screenshot. There seems to be an initialisation problem.

Using FireFox 132.0.1 (latest) on Windows 11

Thanks for reporting.
I tested on Firefox 132.0.1 (64-bit) on Mac and did not see this. The message in $:/plugins/anttt/highlight/CSSCustomHighlightAPINotSupported was always shown, as desired. I’ll fix it as soon as I can.

1 Like

The RSOD could be reproduced on Firefox Mac.
CSS.highlights is undefined if the browser does not support the CSS Custom Highlight API. The test was missing in the reset function.
New version on GitHub.

2 Likes

Version 1.0.3-beta on GitHub.
This version no longer finds, counts and navigates (invisibly) to invisible text: options of dropdown menus, invisible text of folded tiddlers, etc.

1 Like

Version 1.0.4-beta on GitHub.
If you are interested, please check GitHub - janttt/tiddlywiki.highlight: Find and highlight text for future updates.
Feedback and bug reports welcome.

1 Like

The plugin (v1.0.5-beta) now contains the Highlight action-highlight subplugin, which implements the action-highlight action widget.

It may seem odd to implement an action widget to trigger highlighting programmatically. The reason is convenience (or laziness). The screenshot shows part of a tiddler that implements a custom search input field. The Open button opens all tiddlers found. The Highlight button then highlights the text. The button, i.e., the action-highlight action widget, eliminates the need to copy/paste the search text into the input field of the Highlight plugin. There may also be other use cases.

action-highlight

1 Like