How do you create a new tiddler WITHOUT editing?

204 views
Skip to first unread message

Mark S.

unread,
Jun 25, 2015, 11:26:37 PM6/25/15
to tiddl...@googlegroups.com
There are some examples here and there that show how to make a new tiddler using tm-new-tiddler. But they all have you immediately editing the tiddler. How do I create a tiddler silently without opening the new tiddler directory?

An example of why you would want to do this is the situation where you have your own editor inside a generated list. You don't need to see the new tiddler -- you just need to have it made in the background.

Thanks!
Mark
 

Jed Carty

unread,
Jun 26, 2015, 2:03:39 AM6/26/15
to tiddl...@googlegroups.com
You use the action-setfield widget. This button will create a tiddler called Test:

<$button>Something
<$action-setfield $tiddler=Test text=''/>
</$button>

to define other fields just put in more fieldname=value pairs.

Mark S.

unread,
Jun 26, 2015, 1:50:06 PM6/26/15
to tiddl...@googlegroups.com

Thanks Jed!

It appears if I use this approach that I forfeit the ability to use a template tiddler. Correct?

I can still create the tiddler by using a series of $action-setfield widgets, adding the fields and tags I need. Is that the basic approach!

Thanks again!
Mark

Jed Carty

unread,
Jun 26, 2015, 1:58:21 PM6/26/15
to tiddl...@googlegroups.com
If you want to use a template tiddler you use this:

<$button>Make Tiddler Using Template
<$action-setfield $tiddler=TemplateTiddler title=NewTitle other_filed="some value"/>
</$button>

Because of how action-setfield works this creates a new tiddler that is a copy of the template with a new title and has no affect on the template. You should be able to do almost everything (or possibly everything) that you can do using template tiddlers and the message this way.

Mark S.

unread,
Jun 26, 2015, 5:32:19 PM6/26/15
to tiddl...@googlegroups.com
Thanks Jed,

That's really cool. Maybe I'll see if I can add it to the documentation.

Thanks!
Mark
Reply all
Reply to author
Forward
0 new messages