2016-10-21 10:26:26 +00:00
|
|
|
created: 20161020153426686
|
2024-09-10 10:49:04 +00:00
|
|
|
modified: 20240602160452171
|
2023-01-17 17:29:08 +00:00
|
|
|
tags: ActionCreateTiddlerWidget
|
2016-10-21 10:26:26 +00:00
|
|
|
title: ActionCreateTiddlerWidget Example
|
|
|
|
type: text/vnd.tiddlywiki
|
|
|
|
|
2024-09-10 10:49:04 +00:00
|
|
|
<$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()
|
2021-06-01 08:41:14 +00:00
|
|
|
<$action-createtiddler $basetitle="Homemade Button" tags="$:/tags/PageControls" text={{$:/state/new-button-caption}}>
|
2024-09-10 10:49:04 +00:00
|
|
|
<$action-navigate $to=<<createTiddler-title>>/>
|
2021-06-01 08:41:14 +00:00
|
|
|
</$action-createtiddler>
|
2024-09-10 10:49:04 +00:00
|
|
|
\end
|
|
|
|
|
|
|
|
{{$:/core/ui/SideBarSegments/page-controls}}
|
|
|
|
|
|
|
|
Caption for new button: <$edit-text tiddler="$:/state/new-button-caption" tag="input" default=""/>
|
|
|
|
|
|
|
|
<$button actions=<<testCreate>> >
|
|
|
|
Create Tiddler
|
|
|
|
</$button>"""/>
|
|
|
|
<$data title="$:/state/new-button-caption" text="button text "/>
|
|
|
|
</$testcase>
|