1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-29 21:09:56 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/system/wikitext-macros.tid
Mario Pietsch 8af7054efa
Doc restructuring Plugin Install using core Libraries and with Node.js (#6722)
* Doc restructuring Plugin Install using core Libraries and with Node.js

* fixing typos and concerns raised by Jeremy
2022-06-20 13:55:12 +01:00

104 lines
2.1 KiB
Plaintext

code-body: yes
created: 20150117184156000
modified: 20220617122915793
tags: $:/tags/Macro
title: $:/editions/tw5.com/wikitext-macros
type: text/vnd.tiddlywiki
\define activatePluginTab()
<$action-setfield $tiddler="$:/state/tab-1749438307" text="$:/core/ui/ControlPanel/Plugins"/>
<$action-navigate $to="$:/ControlPanel"/>
\end
\define activateTiddlerWindow()
<$action-sendmessage $message="tm-open-window"
$param=<<currentTiddler>> windowTitle="Side by Side View"
width="800" height="600" />
\end
\define controlPanel-plugin-link()
<$button actions=<<activatePluginTab>> class="tc-btn-invisible tc-tiddlylink">
{{$:/core/images/options-button}} ~ControlPanel
</$button>
\end
\define open-tiddler-in-window()
<$button actions=<<activateTiddlerWindow>> class="tc-btn-invisible tc-tiddlylink">
open ''this'' tiddler in a new window
</$button>
\end
\define activateEditionWindow(url)
<$action-sendmessage $message="tm-open-external-window"
$param="""$url$""" windowName="_edition"
windowFeatures="width=800 height=600" />
\end
\define open-external-window(url)
<$button actions=<<activateEditionWindow """$url$""">> class="tc-btn-invisible tc-tiddlylink">
open the ''example edition'' in a new window
</$button>
\end
\define wikitext-example(src)
<div class="doc-example">
<$macrocall $name="copy-to-clipboard-above-right" src=<<__src__>>/>
```
$src$
```
That renders as:
$$$text/vnd.tiddlywiki
$src$
$$$
... and the underlying HTML is:
$$$text/vnd.tiddlywiki>text/html
$src$
$$$
</div>
\end
\define wikitext-example-without-html(src)
<div class="doc-example">
<$macrocall $name="copy-to-clipboard-above-right" src=<<__src__>>/>
```
$src$
```
That renders as:
$$$text/vnd.tiddlywiki
$src$
$$$
</div>
\end
\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
\define tw-code(tiddler)
<$codeblock language={{$tiddler$!!type}} code={{$tiddler$}}/>
\end
\define tw-code-link(tiddler)
[[$tiddler$]]:
<<tw-code $tiddler$>>
\end