2020-04-15 14:51:21 +00:00
|
|
|
created: 20200131144828713
|
2024-09-10 10:49:04 +00:00
|
|
|
modified: 20240602160133371
|
2023-01-17 17:29:08 +00:00
|
|
|
tags: ActionCreateTiddlerWidget
|
2020-04-15 14:51:21 +00:00
|
|
|
title: ActionCreateTiddlerWidget Example 2
|
|
|
|
type: text/vnd.tiddlywiki
|
|
|
|
|
2024-09-10 10:49:04 +00:00
|
|
|
<$testcase>
|
|
|
|
<$data title=Description text="Transcluded base title"/>
|
|
|
|
<$data title=Narrative text="""The $action-createtiddler widget in this example uses the base title defined in [[$:/language/DefaultNewTiddlerTitle]].
|
2020-04-15 14:51:21 +00:00
|
|
|
|
2024-09-10 10:49:04 +00:00
|
|
|
It will overwrite the tiddler if the button is clicked several times."""/>
|
|
|
|
<$data $tiddler="$:/language/DefaultNewTiddlerTitle"/>
|
|
|
|
<$data title=Output text="""\procedure testCreate()
|
2020-04-15 14:51:21 +00:00
|
|
|
<$action-createtiddler $basetitle={{$:/language/DefaultNewTiddlerTitle}} $overwrite="yes"/>
|
|
|
|
\end
|
|
|
|
|
|
|
|
<$button actions=<<testCreate>> >
|
|
|
|
Create Tiddler
|
2024-09-10 10:49:04 +00:00
|
|
|
</$button>"""/>
|
|
|
|
</$testcase>
|