2022-06-20 12:55:12 +00:00
|
|
|
code-body: yes
|
2015-01-18 18:39:00 +00:00
|
|
|
created: 20150117184156000
|
2024-07-28 12:43:20 +00:00
|
|
|
modified: 20240716181836632
|
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
|
|
|
|
2024-03-13 22:02:56 +00:00
|
|
|
\whitespace trim
|
|
|
|
|
|
|
|
\procedure activatePluginTab()
|
2022-06-20 12:55:12 +00:00
|
|
|
<$action-setfield $tiddler="$:/state/tab-1749438307" text="$:/core/ui/ControlPanel/Plugins"/>
|
|
|
|
<$action-navigate $to="$:/ControlPanel"/>
|
|
|
|
\end
|
|
|
|
|
2024-03-13 22:02:56 +00:00
|
|
|
\procedure activateTiddlerWindow()
|
|
|
|
<$action-sendmessage $message="tm-open-window" $param=<<currentTiddler>> windowTitle="Side by Side View" width="800" height="600" />
|
2022-06-20 12:55:12 +00:00
|
|
|
\end
|
|
|
|
|
2024-03-13 22:02:56 +00:00
|
|
|
\procedure controlPanel-plugin-link()
|
2022-06-20 12:55:12 +00:00
|
|
|
<$button actions=<<activatePluginTab>> class="tc-btn-invisible tc-tiddlylink">
|
2024-03-13 22:02:56 +00:00
|
|
|
{{$:/core/images/options-button}} ~ControlPanel
|
2022-06-20 12:55:12 +00:00
|
|
|
</$button>
|
|
|
|
\end
|
|
|
|
|
2024-03-13 22:02:56 +00:00
|
|
|
\procedure open-tiddler-in-window()
|
|
|
|
\whitespace notrim
|
2022-06-20 12:55:12 +00:00
|
|
|
<$button actions=<<activateTiddlerWindow>> class="tc-btn-invisible tc-tiddlylink">
|
2024-03-13 22:02:56 +00:00
|
|
|
open ''this'' tiddler in a new window
|
2022-06-20 12:55:12 +00:00
|
|
|
</$button>
|
|
|
|
\end
|
|
|
|
|
2024-03-13 22:02:56 +00:00
|
|
|
\procedure activateEditionWindow(url)
|
|
|
|
<$action-sendmessage $message="tm-open-external-window" $param=<<url>> windowName="_edition" windowFeatures="width=800 height=600" />
|
2022-06-20 12:55:12 +00:00
|
|
|
\end
|
|
|
|
|
2024-03-13 22:02:56 +00:00
|
|
|
\procedure open-external-window(url)
|
|
|
|
\whitespace notrim
|
|
|
|
<$button actions=<<activateEditionWindow <<url>> class="tc-btn-invisible tc-tiddlylink">
|
|
|
|
open the ''example edition'' in a new window
|
2022-06-20 12:55:12 +00:00
|
|
|
</$button>
|
|
|
|
\end
|
|
|
|
|
|
|
|
|
2024-03-13 22:02:56 +00:00
|
|
|
\procedure wikitext-example(src)
|
2015-01-18 18:39:00 +00:00
|
|
|
<div class="doc-example">
|
2024-03-13 22:02:56 +00:00
|
|
|
<$macrocall $name="copy-to-clipboard-above-right" src=<<src>>/>
|
|
|
|
<$codeblock code=<<src>>/>
|
|
|
|
<p>
|
|
|
|
That renders as:
|
|
|
|
</p>
|
|
|
|
<$transclude $variable="src" $mode="block"/>
|
|
|
|
<p>
|
|
|
|
... and the underlying HTML is:
|
|
|
|
</p>
|
|
|
|
<$wikify name="html" text=<<src>> output="html">
|
|
|
|
<$codeblock code=<<html>>/>
|
|
|
|
</$wikify>
|
2015-01-18 18:39:00 +00:00
|
|
|
</div>
|
2014-06-12 17:01:33 +00:00
|
|
|
\end
|
|
|
|
|
2024-03-13 22:02:56 +00:00
|
|
|
\procedure wikitext-example-without-html(src)
|
2015-01-18 18:39:00 +00:00
|
|
|
<div class="doc-example">
|
2024-03-13 22:02:56 +00:00
|
|
|
<$macrocall $name="copy-to-clipboard-above-right" src=<<src>>/>
|
|
|
|
<$codeblock code=<<src>>/>
|
|
|
|
<p>
|
|
|
|
That renders as:
|
|
|
|
</p>
|
2024-03-15 18:08:37 +00:00
|
|
|
<$transclude $variable="src" $mode="block"/>
|
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
|
|
|
|
2024-03-13 22:02:56 +00:00
|
|
|
\procedure wikitext-example-table-header() <thead><tr><th/><th>wiki text</th><th>renders as</th></tr></thead>
|
2022-01-23 09:44:01 +00:00
|
|
|
|
2024-03-13 22:02:56 +00:00
|
|
|
\procedure wikitext-example-table-row(id, code)
|
|
|
|
<tr>
|
|
|
|
<th><<id>></th>
|
|
|
|
<td><$codeblock code=<<code>>/></td>
|
2024-06-22 16:53:47 +00:00
|
|
|
<td><$transclude $variable="code" $mode="block"/></td>
|
2022-01-23 09:44:01 +00:00
|
|
|
</tr>
|
|
|
|
\end
|
|
|
|
|
2024-03-13 22:02:56 +00:00
|
|
|
\procedure tw-code(tiddler)
|
2024-07-28 12:43:20 +00:00
|
|
|
<$codeblock language={{{ [<tiddler>get[type]] }}} code={{{ [<tiddler>get[text]] }}}/>
|
2015-01-11 10:55:22 +00:00
|
|
|
\end
|
|
|
|
|
2024-03-13 22:02:56 +00:00
|
|
|
\procedure tw-code-link(tiddler)
|
2024-07-28 12:43:20 +00:00
|
|
|
<$link to=<<tiddler>>/>:
|
|
|
|
<$transclude $variable=tw-code tiddler=<<tiddler>> />
|
2022-03-02 17:36:53 +00:00
|
|
|
\end
|