My question is how to highlight strings in the text field of an input tiddler

Hello

My question is how to highlight strings from the text field of an input tiddler
as the first step in previewing the potential changes for a search/replace utility.

The primary use case is to highlight/replace keywords in macro definitions.

The steps are

  • count the number of matches and echo the input parms
  • generate the outputText (with highlighting applied to searchString matches (not rendered)
  • render the outputText showing the highlighted string

The first two steps work as expected.
The last step works intermittently at best.

Steve


Here is the output showing

  • the match count and input parameters
  • the output text with highlighting applied to searchString matches
  • the output text as rendered

formatTid.highlightString.png


Here is the code


Oops! I found a link to an earlier version of this question from 2020 which I managed to lose track of.
I will give that a try - it worked before

See ttps://groups.google.com/d/msgid/tiddlywiki/93917d0d-97f3-4182-b5dc-b6cbf810246co%40googlegroups.com.

It kind of looks like you’re trying to do something similar to the official Dynannotate plugin.

Hi Mark_S

You are probably correct.

I looked in https://tiddlywiki.com/ to read the description of the Dynannote plugin. The plugin was mentioned in several of the recent release notes but I was unable to find any specific descriptions.

Where should I be looking?

THanks

TiddlyWiki control panel > plugins > Get More Pluggins

Dynnanote is in the list

I found it - thanks!