From e67eaca0305dd8164e3dbb7d14d76ff72e407d14 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 11 Mar 2024 12:13:25 +0000 Subject: [PATCH] Revert "Docs - wikitext-macros new v5.3.x syntax (#8033)" This reverts commit 0fb10da8b34202dcbd0e815fb45b106ac15a539c. --- .../tiddlers/system/wikitext-macros.tid | 116 ++++++++++-------- 1 file changed, 62 insertions(+), 54 deletions(-) diff --git a/editions/tw5.com/tiddlers/system/wikitext-macros.tid b/editions/tw5.com/tiddlers/system/wikitext-macros.tid index 89de7d022..7db97bf50 100644 --- a/editions/tw5.com/tiddlers/system/wikitext-macros.tid +++ b/editions/tw5.com/tiddlers/system/wikitext-macros.tid @@ -1,96 +1,104 @@ code-body: yes created: 20150117184156000 -modified: 20240229155641000 +modified: 20220617122915793 tags: $:/tags/Macro title: $:/editions/tw5.com/wikitext-macros type: text/vnd.tiddlywiki -\whitespace trim - -\procedure activatePluginTab() +\define activatePluginTab() <$action-setfield $tiddler="$:/state/tab-1749438307" text="$:/core/ui/ControlPanel/Plugins"/> <$action-navigate $to="$:/ControlPanel"/> \end -\procedure activateTiddlerWindow() -<$action-sendmessage $message="tm-open-window" $param=<> windowTitle="Side by Side View" width="800" height="600" /> +\define activateTiddlerWindow() +<$action-sendmessage $message="tm-open-window" + $param=<> windowTitle="Side by Side View" + width="800" height="600" /> \end -\procedure controlPanel-plugin-link() +\define controlPanel-plugin-link() <$button actions=<> class="tc-btn-invisible tc-tiddlylink"> - {{$:/core/images/options-button}} ~ControlPanel +{{$:/core/images/options-button}} ~ControlPanel \end -\procedure open-tiddler-in-window() -\whitespace notrim +\define open-tiddler-in-window() <$button actions=<> class="tc-btn-invisible tc-tiddlylink"> - open ''this'' tiddler in a new window +open ''this'' tiddler in a new window \end -\procedure activateEditionWindow(url) -<$action-sendmessage $message="tm-open-external-window" $param=<> windowName="_edition" windowFeatures="width=800 height=600" /> +\define activateEditionWindow(url) +<$action-sendmessage $message="tm-open-external-window" + $param="""$url$""" windowName="_edition" + windowFeatures="width=800 height=600" /> \end -\procedure open-external-window(url) -\whitespace notrim -<$button actions=<> class="tc-btn-invisible tc-tiddlylink"> - open the ''example edition'' in a new window +\define open-external-window(url) +<$button actions=<> class="tc-btn-invisible tc-tiddlylink"> +open the ''example edition'' in a new window \end -\procedure wikitext-example(src) +\define wikitext-example(src)
- <$macrocall $name="copy-to-clipboard-above-right" src=<>/> - <$codeblock code=<>/> -

- That renders as: -

- <$transclude $variable="src" $mode="block"/> -

- ... and the underlying HTML is: -

- <$wikify name="html" text=<> output="html"> - <$codeblock code=<>/> - + +<$macrocall $name="copy-to-clipboard-above-right" src=<<__src__>>/> + +<$codeblock code=<<__src__>>/> + +That renders as: + +<$macrocall $name="__src__"/> + +... and the underlying HTML is: + +<$wikify name="html" text=<<__src__>> output="html"> +<$codeblock code=<>/> +
\end -\procedure wikitext-example-without-html(src) +\define wikitext-example-without-html(src)
- <$macrocall $name="copy-to-clipboard-above-right" src=<>/> - <$codeblock code=<>/> -

- That renders as: -

- <$macrocall $name="src"/> + +<$macrocall $name="copy-to-clipboard-above-right" src=<<__src__>>/> + +<$codeblock code=<<__src__>>/> + +That renders as: + +<$macrocall $name="__src__"/> +
\end -\procedure wikitext-example-table-header() wiki textrenders as +\define wikitext-example-table-header() wiki textrenders as -\procedure wikitext-example-table-row(id, code) - - <> - <$codeblock code=<>/> - <> +\define wikitext-example-table-row(id, code) + +<<__id__>><$codeblock code=<<__code__>>/> + +<<__code__>> + \end -\procedure tw-code(tiddler) +\define tw-code(tiddler) <$codeblock language={{$tiddler$!!type}} code={{$tiddler$}}/> \end -\procedure tw-code-link(tiddler) +\define tw-code-link(tiddler) [[$tiddler$]]: + <> \end -\procedure flex-card(class,bordercolor:"",backgroundcolor:"",textcolor:"",imageField:"image",captionField:"caption",subtitle:"",descriptionField:"description", inkField:"link") -<$link class={{{ [addprefix[tc-card ]] }}} to={{{ [getelse] }}}> -
!is[blank]addprefix[5px solid ]] }}} style.background={{!!background}} style.backgroundColor=<> style.color=<> style.fill=<>> +\define flex-card(class,bordercolor:"",backgroundcolor:"",textcolor:"",imageField:"image",captionField:"caption",subtitle:"",descriptionField:"description",linkField:"link") +\whitespace trim +<$link class={{{ [<__class__>addprefix[tc-card ]] }}} to={{{ [get<__linkField__>else] }}}> +
!is[blank]addprefix[5px solid ]] }}} style.background={{!!background}} style.backgroundColor=<<__backgroundcolor__>> style.color=<<__textcolor__>> style.fill=<<__textcolor__>>> <$list filter="[has[ribbon-text]]" variable="ignore">
get[ribbon-color]else[red]] }}}> @@ -100,21 +108,21 @@ type: text/vnd.tiddlywiki
- <$list filter="[has]" variable="ignore"> + <$list filter="[has<__imageField__>]" variable="ignore">
- <$image source={{{ [get] }}}/> + <$image source={{{ [get<__imageField__>] }}}/>
-
<$transclude field=<>><$view field="title"/>
- <$list filter="[!is[blank]]" variable="ignore"> +
<$transclude field=<<__captionField__>>><$view field="title"/>
+ <$list filter="[<__subtitle__>!is[blank]]" variable="ignore">
- <$text text=<>/> + <$text text=<<__subtitle__>>/>
<$transclude tiddler={{!!icon}}/>
- <$transclude field=<> mode="block"/> + <$transclude field=<<__descriptionField__>> mode="block"/>