Note: An alternative skin, TW4MW (work in progress), is available from the user preferences.
NewTiddler (macro)
TiddlyWiki Community Wiki
(Redirected from NewTiddler)
This macro generates a button to create a new tiddler.
Contents |
[edit] Usage
<<newTiddler [parameters]>>
[edit] Parameters
This macro uses named parameters. All parameters are optional.
| Parameter | Description |
|---|---|
| label | button label |
| prompt | button tooltip |
| title | title for the new tiddler (defaults to "New Tiddler") |
| text | contents for the new tiddler |
| tag | tag to be applied to the new tiddler (parameter can be used repeatedly to specify multiple tags) |
| accessKey | single letter to use as access key to trigger the button |
| focus | which of the editable fields to default the focus to (e.g. "title", "text", "tags") |
| template | name of the HTML template used to display the new tiddler (defaults to EditTemplate) |
| fields | custom fields to be assigned to the new tiddler (space-separated list of key:value pairs; e.g. fields:"k1:v1 k2:v2")
|
Only fields contained as input fields in the specified template can be primed with an initial value.
[edit] Examples
<<newTiddler label:"New Tiddler" text:"Hello world." tag:"test" tag:"an example" accessKey:"1" focus:"tags" >>
Using evaluated parameters, the content of a regular tiddler can be inserted as boilerplate text:
<<newTiddler
text:{{store.getTiddlerText("SampleTiddler")}}
>>
(Where SampleTiddler is the name of the tiddler containing the boilerplate text.)

