2022-04-30 09:00:38 +00:00
|
|
|
title: Transclude/CustomWidget/ActionWidget
|
2022-04-26 12:05:44 +00:00
|
|
|
description: Custom widget definition
|
|
|
|
type: text/vnd.tiddlywiki-multiple
|
|
|
|
tags: [[$:/tags/wiki-test-spec]]
|
|
|
|
|
|
|
|
title: Output
|
|
|
|
|
|
|
|
\whitespace trim
|
2022-04-30 09:00:38 +00:00
|
|
|
<$transclude $tiddler='Result'>
|
|
|
|
</$transclude>
|
2022-05-03 15:53:00 +00:00
|
|
|
+
|
2022-04-26 12:05:44 +00:00
|
|
|
title: Actions
|
|
|
|
|
|
|
|
\whitespace trim
|
|
|
|
<!-- Define the <$action-mywidget> widget by defining a transcludable variable with that name -->
|
2022-05-02 09:56:22 +00:00
|
|
|
\function <$action-mywidget>(one:'Jaguar')
|
|
|
|
\whitespace trim
|
|
|
|
<$action-setfield $tiddler="Result" $field="text" $value=<<one>>/>
|
|
|
|
\end
|
|
|
|
|
|
|
|
<$action-mywidget one="Dingo">
|
|
|
|
Crocodile
|
|
|
|
</$action-mywidget>
|
2022-05-03 15:53:00 +00:00
|
|
|
+
|
2022-04-26 12:05:44 +00:00
|
|
|
title: ExpectedResult
|
|
|
|
|
|
|
|
<p>Dingo</p>
|