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=<> windowTitle="Side by Side View" width="800" height="600" /> \end \define controlPanel-plugin-link() <$button actions=<> class="tc-btn-invisible tc-tiddlylink"> {{$:/core/images/options-button}} ~ControlPanel \end \define open-tiddler-in-window() <$button actions=<> class="tc-btn-invisible tc-tiddlylink"> open ''this'' tiddler in a new window \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=<> class="tc-btn-invisible tc-tiddlylink"> open the ''example edition'' in a new window \end \define wikitext-example(src)
<$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 \define wikitext-example-without-html(src)
<$macrocall $name="copy-to-clipboard-above-right" src=<<__src__>>/> <$codeblock code=<<__src__>>/> That renders as: <$macrocall $name="__src__"/>
\end \define wikitext-example-table-header() wiki textrenders as \define wikitext-example-table-row(id, code) <<__id__>><$codeblock code=<<__code__>>/> <<__code__>> \end \define tw-code(tiddler) <$codeblock language={{$tiddler$!!type}} code={{$tiddler$}}/> \end \define tw-code-link(tiddler) [[$tiddler$]]: <> \end \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]] }}}>
<$text text={{!!ribbon-text}}/>
<$list filter="[has<__imageField__>]" variable="ignore">
<$image source={{{ [get<__imageField__>] }}}/>
<$transclude field=<<__captionField__>>><$view field="title"/>
<$list filter="[<__subtitle__>!is[blank]]" variable="ignore">
<$text text=<<__subtitle__>>/>
<$transclude tiddler={{!!icon}}/>
<$transclude field=<<__descriptionField__>> mode="block"/>
<$list filter="[all[current]has[button-text]]" variable="ignore">
<$text text={{!!button-text}}/> {{$:/core/images/chevron-right}}
\end