Use the testcase widget for $action-createtiddler examples (#8232)

* Use the testcase widget for the $action-createtiddler widget examples

* Use procedure instead of macros for $action-createtiddler examples
This commit is contained in:
btheado
2024-09-10 06:49:04 -04:00
committed by GitHub
parent 3434884ea4
commit 6505e4610f
7 changed files with 65 additions and 131 deletions

View File

@@ -1,14 +1,24 @@
created: 20161020153426686
modified: 20211113011019510
modified: 20240602160452171
tags: ActionCreateTiddlerWidget
title: ActionCreateTiddlerWidget Example
type: text/vnd.tiddlywiki
<$testcase>
<$data title=Description text="Create a new page control button"/>
<$data title=Narrative text="""Use the $action-createtiddler widget to create and open a new, non-functional page control button tiddler"""/>
<$data title=Output text="""\procedure testCreate()
<$action-createtiddler $basetitle="Homemade Button" tags="$:/tags/PageControls" text={{$:/state/new-button-caption}}>
<$action-navigate $to=<<createTiddler-title>>/>
</$action-createtiddler>
\end
{{$:/core/ui/SideBarSegments/page-controls}}
Caption for new button: <$edit-text tiddler="$:/state/new-button-caption" tag="input" default=""/>
<$button>
<$action-createtiddler $basetitle="Homemade Button" tags="$:/tags/PageControls" text={{$:/state/new-button-caption}}>
<$action-navigate $to=<<createTiddler-title>>/>
</$action-createtiddler>
Create a new non-functional page control button and open the tiddler
</$button>
<$button actions=<<testCreate>> >
Create Tiddler
</$button>"""/>
<$data title="$:/state/new-button-caption" text="button text "/>
</$testcase>