[tw5] Some coding fun: A Word Occurrence Highlighter

Drag the attached to https://tiddlywiki.com/ to import the single tiddler.

This bit of coding fun inspired by the Highlighting duplicates in lists discussion thread.

My kind of “BrainAge” game.

WordOccurenceHighlighter.json (1004 Bytes)

Hi, thanks for sharing this, I struggle a bit with the filter operator so this help a lot !
As a side note, the element would be a more semantic solution :slight_smile:

1 Like

Cognitively, “mark” throws me off because every time I see that I think of “Mark”, a great childhood buddy. Then, whatever I’m trying to do at the moment hits a major pause as I’m distracted by childhood memories. Everything, and I mean everything, is just one degree of separation from everything else …

Giggles aside:

I didn’t focus much on making things particularly very readable or organized or easy to understand (just a quick and dirty coding exercise). If anything is clear as mud, please let me know, and I can clean things up and explain things a smidgen.

Very nice!
I would suggest adding a little documentation!
I also like to add this to the standard TW search!

1 Like

Hi Charlie,

Can this be modified to be used be in the backlinks section. I would like the linked words to be highlighted in all the backlink tiddlers.



I can’t see any reason why not. Looks easy enough to setup.

I suggest you consider creating a custom tab in info instead of modifying the existing one. Less risky when upgrading TiddlyWiki.

\define lingo-base() $:/language/TiddlerInfo/
<$list filter="[all[current]backlinks[]sort[title]]" emptyMessage=<<lingo References/Empty>> template="$:/core/ui/ListItemTemplate">

This is the reference tiddler in the info section.
How should i modify it?

That is way too long to explain.

Here’s a start for you to work with (attached.) Download and drag into TiddlyWiki.com

Charlie’s Backlinks Alternative.json (1.3 KB)

1 Like

I was too busy at work yesterday. So I didn’t get time to test it. Now only got time to check it. Will come back here after testing for sometime.

Hi Charlie,

I couldn’t make much progress with this. I have just added this into my demo wiki. Click on the Wordhighlight link in the topbar.

How to make highlighting work without the word selector.

Also I need to highlight the words within the tiddler body which match the backlinks.

For example, in the tiddler named “Peter Kranz”, there is one backlink seen.

I need to see the text of the “SIH” tiddler also in addition to its links and want to highlight the word “Peter Kranz” within the “SIH” tiddler.

Is it possible?

Your Wiki is much too big, much too different, for me to help. I am not familiar enough with it, and I can’t find things where I expect them to be. It is overwhelming to pinpoint a problem with one thing when facing the whole guacamole.

Very pretty wiki, but it is too tall a task for me to disect it. Maybe somebody else with the time and the energy can dig into it.

Might I suggest that before you introduce functionality into the big/wildly different wiki, that you try new intended features in a small and dedicated TiddlyWiki instance for that one feature.

So that targettetted unit/functional testing can be done for that feature in isolation, or at most with those artifacts (design elements) directly linked to the feature (i.e. things directly linked to the specific feature).

When the feature is working in the small-scale vanilla TiddlyWiki, then integrate that new feature into the big one, and then do the big integration testing. If what was working in the small TiddlyWiki doesn’t work in the big TiddlyWiki, then that helps narrow down the problem.

Does the wordhighlight link in the topbar doesn’t show the relevant tiddlers only. If not I will upload a small wiki later.

This is the wiki I use for all my testings and experiments. So it include most of my tweaks and plug ins. Thats why it may seem like a large wiki. Actual content in this wiki is very less only.

Yeah, it isn’t about the amount of content.

It is the amount of cognitive overload. Like being used to the dashboard of a car and suddenly sitting in front of the controls of a 747.

I find myself playing “Where’s Waldo”, and I can’t stand that game.

I’m thinking it might be easier for some of the experts and leaders, or anybody who can quickly adapt to a different user interface, over in Talk TiddlyWiki to quickly troubleshoot what’s going on…


This is a basic wiki with only the three relevant tiddlers.

Your TiddlyWiki is excellent and beautiful for the minds that function that way, which may very well by 99.99% of folk.

I’m likely that 0.01%, that one single person who gets flustered by it, and I don’t do fluster-me things.

But if there’s a chance that I still can’t help you with a vanilla TiddlyWiki, it might still be useful for somebody else to figure out the problem.