[TW5] The NewtiddlerWidget

225 views
Skip to first unread message

Stephan Hradek

unread,
Dec 18, 2013, 5:26:51 PM12/18/13
to tiddl...@googlegroups.com
http://skeeve.tiddlyspot.com/#test%20newtiddler

This is a test for the highly experimental New-Tiddler-Button.

The New-Tiddler-Button expects 2 parameters:

ParameterMandatoryExplanation
titleyesthe title of the new tiddler. Will get numbers appended
skeletonyesan existing tiddler which may contain variable placeholders
editnoThis defines wether to open the new tiddler in edit mode. Must be one of "yes", "no" or (not implemented yet) "inline

The most important part lies in the skeleton! TiddlyWiki already can clone tiddlers, but you can't really prefill data of the newly created tiddler.

With <$newtiddler> you can put placeholders of the form $(variable)$ anywhere in the tiddler and they will be replaced by the values of the variables set with the <$set> or <$let> widget. Please note: The placeholders can be anywhere! In the tiddlers body, in fields, types, you name it…

The example skeleton used here looks like this:

PropertyContent
titleskeleton 1
textThis is some test: $(placeholder)$
tags$(tag1)$
field1$(f1)$
field2$(f2)$

If we now put this into our tiddler:

<$let f1=<<uuid>> f2="field-2" placeholder="pl1" tag1="testtag">
<$newtiddler title="test" skeleton="skeleton 1">Create</$newtiddler>
</$let>

We get a (Create) button.

Clicking it, will open a new tiddler with some values pre-filled.


Stephan Hradek

unread,
Dec 18, 2013, 5:28:36 PM12/18/13
to tiddl...@googlegroups.com
I forgot to mention: This absolutely must be reviewed by someone with experience. I'm totally sure I did some unconventional stuff which is not appreciated :D
Message has been deleted

PMario

unread,
Dec 19, 2013, 10:17:41 AM12/19/13
to tiddl...@googlegroups.com
IMO there is a clone tiddler possibility in the core. Doesn't it do, what you want?
the "param" parameter can take a "skeleton" tiddler, that will be cloned. including tags and fields.

see: http://tw5toolbar.tiddlyspot.com/ for more

-m

Stephan Hradek

unread,
Dec 19, 2013, 10:25:03 AM12/19/13
to tiddl...@googlegroups.com
Nope!

It does not do what I want.

  1. It can't change the title
  2. It cant' change field values
  3. It can't change the text
  4. It can#t change the type
  5. It can't add tags


Matthew Petty

unread,
May 11, 2015, 4:03:23 AM5/11/15
to tiddl...@googlegroups.com
Thanks for creating this!
I use this to create tasks. Is there a way to tag the newly created tiddler with the current tiddler?

Also, the "edit=yes" doesn't seem to work for me.

Mat

unread,
May 11, 2015, 6:00:40 AM5/11/15
to tiddl...@googlegroups.com
Please note that it is a very old thread you are replying to, @Matthew.

 
Is there a way to tag the newly created tiddler with the current tiddler?

Yes, under the More button (the downpointing arrow/bracket), simply click "new here". You can also make this button appear in the tiddler toolbar directly, via Controlpanel>Appearance>Toolbars>ViewToolbar

<:-)

Matthew Petty

unread,
May 11, 2015, 6:02:34 AM5/11/15
to tiddl...@googlegroups.com
Thanks! That did it.

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/EIEmWhTC9RE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/70a968ea-66c6-495c-b56d-f068d22ff973%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



Reply all
Reply to author
Forward
0 new messages