To prevent tiddlywiki from wikifying the content of your tiddler, you can use a pragma rule at the beginning of the tiddler :
\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline html
You can also use wikitext to “escape” css. For example, if you try to set a CSS variable inside a tag, tiddlywiki will parse – and make it into a -.
To prevent this you can turn it into a code snippet : --
This way you keep your formatting.
I don’t know if it is relevant but by mere coincidence I was fiddling around with images in TW and stumbled across this. Check it out.
The $(…)$ syntax is… let’s back up:
$$ is used to apply the argument value of a macro parameter. But the $()$ syntax allows you to use a variable value from outside of the macro, and that was not included as an argument in the macro. (I’m probably not using the terminology correct.)
My issue now is the “text” argument to the makedatauri macro; it needs to be dynamic, but everything I’ve tried interprets the value literally—so I get an encoded {{!!title}} instead of the encoded actual title of the tiddler. I also tried assigning it as a variable using another $set widget but no luck. I feel like I’m missing some syntax…
Ok, I got it working. I forgot my original source was based off of the LinkStyle (http://linkstyle.tiddlyspot.com), which I had seen in one of Matt’s previous email threads. Once I restored the original wrapping widgets, Télumire’s SVG-handling code provided the missing piece. After a bit of style tweaking, I got what I was after with this:
\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline html
I see now that I can use $vars and “”“$()”“”" to pass dynamic arguments to a macro, so that answers my earlier question. I’m still curious if there’s a terser way to accomplish this, though.
Now I can set an “icon” field for a tiddler that points to a SVG, and any link to that tiddler will show that icon in the link. Combined with SVGs I’m pulling in from TW Icons v1.10 — A large collection of icons for TiddlyWiki along with a few of my own for smaller libraries that still have logos but aren’t published, and I’m where I want to be… for now, at least!