This page is part of a static HTML representation of the TiddlyWiki at https://tiddlywiki.com/

datauri Macro (Examples)

 21st February 2015 at 10:35pm

<style>
.jack {
	background: url(<$macrocall $name="datauri" title="Motovun Jack.jpg" $output="text/plain"/>);
	height: 300px;
}
</style>

<div class="jack"/>

The example has to invoke datauri through the $macrocall widget. It needs to prevent the macro's output from being parsed as WikiText, as that would transform the data URI into a $link widget and break the example. If the example was in a CSS tiddler, you could simply write:

background: url(<<datauri "Motovun Jack.jpg">>);