1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-13 17:16:48 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 5.tid
Mario Pietsch af1cc56c0c
[DOC] Improve ActionCreateTiddlerWidget documentation (#7202)
* [DOC] Improve ActionCreateTiddlerWidget documentation

* action-createtitddler improve docs as requested
2023-01-17 17:29:08 +00:00

33 lines
1.1 KiB
Plaintext

created: 20200131144828713
modified: 20230111220933412
tags: ActionCreateTiddlerWidget
title: ActionCreateTiddlerWidget Example 5
type: text/vnd.tiddlywiki
\define testCreate()
<$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template">
<$action-sendmessage $message="tm-edit-tiddler" $param=<<createTiddler-title>>/>
</$action-createtiddler>
\end
This example will use the base title defined in [[ActionCreateTiddlerWidget Template]].
It will create: "base", "base 1", "base 2" and so on, and navigate to this tiddler in draft mode.
```
\define testCreate()
<$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template">
<$action-sendmessage $message="tm-edit-tiddler" $param=<<createTiddler-title>>/>
</$action-createtiddler>
\end
<$button actions=<<testCreate>> >
Create Tiddler
</$button>
```
<$button actions=<<testCreate>> >
<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/>
Create Tiddler
</$button> - Clicking this button, will also open the Right sidebar: Recent tab