2015-01-18 18:39:00 +00:00
|
|
|
created: 20150117184156000
|
2022-01-23 09:44:01 +00:00
|
|
|
modified: 20220122143551571
|
2014-06-12 17:01:33 +00:00
|
|
|
tags: $:/tags/Macro
|
2022-01-23 09:44:01 +00:00
|
|
|
title: $:/editions/tw5.com/wikitext-macros
|
|
|
|
type: text/vnd.tiddlywiki
|
2014-06-12 17:01:33 +00:00
|
|
|
|
|
|
|
\define wikitext-example(src)
|
2015-01-18 18:39:00 +00:00
|
|
|
<div class="doc-example">
|
|
|
|
|
2017-12-16 10:58:33 +00:00
|
|
|
<$macrocall $name="copy-to-clipboard-above-right" src=<<__src__>>/>
|
|
|
|
|
2014-06-12 17:01:33 +00:00
|
|
|
```
|
|
|
|
$src$
|
|
|
|
```
|
|
|
|
|
2015-01-18 18:39:00 +00:00
|
|
|
That renders as:
|
2014-06-12 17:01:33 +00:00
|
|
|
|
2021-03-09 18:11:36 +00:00
|
|
|
$$$text/vnd.tiddlywiki
|
2014-06-12 17:01:33 +00:00
|
|
|
$src$
|
2021-03-09 18:11:36 +00:00
|
|
|
$$$
|
2014-06-12 17:01:33 +00:00
|
|
|
|
2015-01-18 18:39:00 +00:00
|
|
|
... and the underlying HTML is:
|
2014-06-12 17:01:33 +00:00
|
|
|
|
|
|
|
$$$text/vnd.tiddlywiki>text/html
|
|
|
|
$src$
|
|
|
|
$$$
|
2015-01-18 18:39:00 +00:00
|
|
|
</div>
|
2014-06-12 17:01:33 +00:00
|
|
|
\end
|
|
|
|
|
|
|
|
\define wikitext-example-without-html(src)
|
2015-01-18 18:39:00 +00:00
|
|
|
<div class="doc-example">
|
|
|
|
|
2017-12-16 10:58:33 +00:00
|
|
|
<$macrocall $name="copy-to-clipboard-above-right" src=<<__src__>>/>
|
|
|
|
|
2014-06-12 17:01:33 +00:00
|
|
|
```
|
|
|
|
$src$
|
|
|
|
```
|
|
|
|
|
2015-01-18 18:39:00 +00:00
|
|
|
That renders as:
|
2014-06-12 17:01:33 +00:00
|
|
|
|
2021-03-09 18:11:36 +00:00
|
|
|
$$$text/vnd.tiddlywiki
|
2014-06-12 17:01:33 +00:00
|
|
|
$src$
|
2021-03-09 18:11:36 +00:00
|
|
|
$$$
|
2015-01-18 18:39:00 +00:00
|
|
|
</div>
|
2014-06-12 17:01:33 +00:00
|
|
|
\end
|
2015-01-11 10:55:22 +00:00
|
|
|
|
2022-01-23 09:44:01 +00:00
|
|
|
\define wikitext-example-table-header() <thead><tr><th/><th>wiki text</th><th>renders as</th></tr></thead>
|
|
|
|
|
|
|
|
\define wikitext-example-table-row(id, code)
|
|
|
|
<tr>
|
|
|
|
<th><<__id__>></th><td><$codeblock code=<<__code__>>/></td><td>
|
|
|
|
|
|
|
|
<<__code__>>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
\end
|
|
|
|
|
2015-01-11 10:55:22 +00:00
|
|
|
\define tw-code(tiddler)
|
2015-01-11 17:15:27 +00:00
|
|
|
<$codeblock language={{$tiddler$!!type}} code={{$tiddler$}}/>
|
2015-01-11 10:55:22 +00:00
|
|
|
\end
|
|
|
|
|
|
|
|
\define tw-code-link(tiddler)
|
|
|
|
[[$tiddler$]]:
|
|
|
|
|
|
|
|
<<tw-code $tiddler$>>
|
|
|
|
\end
|