> The saveStoryButton will be placed on the Menu. The advantage the
> newTiddlerPlugin compared to saveStory would be, that it is possible to
> created the new StoryTiddler in editMode with the focus set on the
> title, to make the users change the storyname immediately. I would even
> like bette to have a prompt saying " insert a name for your new tiddler
> here"
Except for changing the storyname, it's not clear to me what advantage
there is in opening the newly created story tiddler in edit mode...
and, you *can* use <<saveStory>> to "prompt for tiddlername" with the
'ask' option:
<<saveStory ask "label" "helptext" tag tag tag...>>
Note also that your approach -- generating a <<newTiddler>> macro --
won't actually achieve the results you want, for one very important
reason: the list of tiddlers that are open when you *generate and
render* the <<newTiddler>> macro will almost certainly be different
from the tiddlers that are open when you later *click* on the rendered
menu link. Because the <<newTiddler>> macro's parameters are not
generated when you click, it will always create a story using the same
initial set of open tiddlers, rather than the *currently* open set.
Fortunately, there is a solution for this type of problem:
http://www.TiddlyTools.com/#ClickifyPlugin
allows you to re-calculate macro parameters whenever a rendered
command is clicked. You simply install the plugin and then add
"clickify" to the front of the macro call.
For your purposes, you can completely skip the <<forEachTiddler>>
action, and use "evaluated parameters" with <<newTiddler>> to generate
the list of open tiddlers. You can also prompt for a story name at
the same time!
Something like this:
<<clickify newTiddler
label:Test focus:title tag:hinzugef gt tag:stunde
title:{{prompt('enter a new story name','MyNewStory')}}
text:{{
var out="";
story.forEachTiddler(function(t){out+="[["+t+"]]\n";});
out;
}}
>>
To generate the list of open tiddlers, the text:{{...}} parameter
defines an empty output variable, then appends tiddlers titles, and
then references that output variable as the last statement processed
within the code, so that the resulting list of titles is "returned" as
the parameter value.
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
http://www.TiddlyTools.com/#Donations
Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywiki?hl=en.