Better late than never: thanks a lot for the help! 😊 On Wednesday, November 25, 2020 at 3:48:26 PM UTC+1 Eric Shulman wrote:
> On Wednesday, November 25, 2020 at 5:33:22 AM UTC-8 [email protected] > wrote: > >> I am trying to do something I thought would be easy, but it turned out >> not to be: I want to color text on a tiddler with a color stored in a >> field. The naive solution would look like: (color_field has the value >> "blue") >> @@color:{{!!color_field}}; >> bla >> @@ >> > > While it seems like a reasonable usage, this is another instance where you > can't directly combine different kinds of wiki syntax. In the above > example, the TWCore parser would first have to replace {{!!color_field}} > with it's value (e.g., "blue"), and then perform a *second* parsing > action to process the resulting @@color:blue; bla @@ syntax. > > Fortunately, there is a way to achieve the results you want, by using an > HTML <span> instead of "@@", where the span has a style attribute that is > constructed using "filtered transclusion", like this: > > <span style={{{ [[color:]addsuffix{!!color_field}] }}}> > bla > </span> > > enjoy, > -e > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/cf886ac4-370f-4830-8ae7-4fd46af853b9n%40googlegroups.com.

