[TW5] Highlight text

967 views
Skip to first unread message

Jimmy Liew

unread,
Jun 30, 2014, 2:14:41 AM6/30/14
to tiddl...@googlegroups.com
Hi All,

Just a quick simple question.  Can we highlight some of the text in our tiddler using the classic TW way, for instance @@highlight@@.

It doesn't work in TW5 as I tried it.

Does any one know how to do that? 


Regards
Jim

Stephan Hradek

unread,
Jun 30, 2014, 1:13:18 PM6/30/14
to tiddl...@googlegroups.com
As far as I know it's not implemented, but you can trick it:

Create a tiddler "hl":
<span class="highlight">{{!!title}}</span>

Create a tiddler highlight.css:
span.highlight {
    background
-color:yellow;
}

Tag it with $:/tags/stylesheet

Now use, instead of @@highlight@@
some text with {{what I want to highlight||hl}}.








Odder

unread,
Jun 30, 2014, 1:28:21 PM6/30/14
to tiddl...@googlegroups.com
Another possibility: you make a class in your stylesheet for example:

.hl { background-color:yellow; }

and use it in your text like this:

@@.hl HighlightedText@@     (space after .hl is important)

This is similar to TWC.

Regards
Odder

Måns

unread,
Jul 1, 2014, 2:45:59 AM7/1/14
to tiddl...@googlegroups.com
You can have it both ways:
 
.hl { background-color:yellow; }

and use it in your text like this:

@@.hl HighlightedText@@     (space after .hl is important)

Create a tiddler "hl": 

@@.hl {{!!title}}@@ 

Use it like this:

some text with {{what I want to highlight||hl}}.


Cheers Måns Mårtensson 

Donald Bosart

unread,
Jun 8, 2021, 1:56:55 PM6/8/21
to TiddlyWiki
Just found this so bear with me please, why did TW5 drop the simple syntax that was in TW4?  Part of the utility of TW in my view was that its markup was simple enough for anyone to use without having to be a css guru.  I mean, I get it, the css provides lots of flexibility; but, unfortunately, the simple accessible syntax was dropped?  That seems like a step backwards.

Thus the question... why?

Thanks,
Donald.

TW Tones

unread,
Jun 8, 2021, 6:41:35 PM6/8/21
to TiddlyWiki
Donald.

No syntax has being dropped especially with css, to my knowledge and the ability to customise and extend tiddlywiki only grown. Please detail what "syntax" or use case you are having a problem with.

Regards
Tones

David Gifford

unread,
Jun 8, 2021, 7:15:52 PM6/8/21
to TiddlyWiki
Just change @@highlight@@ to @@.highlight yourtext@@. Note the space before your text.

TW Tones

unread,
Jun 8, 2021, 7:46:50 PM6/8/21
to TiddlyWiki
Also;


You can use $$$ or https://tiddlywiki.com/#Typed%20Blocks%20in%20WikiText to use extension, or content types.

Tones

Reply all
Reply to author
Forward
0 new messages