Further one.

I followed all the steps Eric said. It worked. But the input box
displayed a word 'undefined' in it.
I'd like to change it to the date of today as the default value. So I
add one line in 'SystemTweak':

config.options.txtNewTiddlerName = <<today>>;

This cause an error when reload my TW: SyntaxError: illegal XML
character

Any ideas?

octw

On Aug 18, 9:16 am, octw <blog...@gmail.com> wrote:
> Great thanks Eric, you are the man.
>
> Cheers,
> octw
>
> On 8月17日, 下午10時48分, Eric Shulman <elsdes...@gmail.com> wrote:
>
> > > I'm wondering if it is possible to put an input box in front of the
> > > 'new tiddler' button, so one can write down some words in the box then
> > > hit the 'new tiddler' button to open the tiddler with the title 'some
> > > words'?
>
> > This *can* be done.
>
> > 1) create an input field using:
> >    <<option txtNewTiddlerName>>
> > The *name* of the option is arbitrary.  The value entered into the
> > input field is stored in
> >    config.options.txtNewTiddlerName
>
> > 2) create the desired newTiddler macro:
> >    <<newTiddler ... title:{{config.options.txtNewTiddlerName}} ... >>
> > Note use of the "title:... *evaluated* parameter.  This retrieves the
> > value stored by the <<option>> macro and uses it as the value for the
> > new tiddler.
>
> > HOWEVER....
>
> > The <<newTiddler>> macro parameters are evaluated when the macro is
> > initially *rendered*, not when the resulting command link is clicked
> > upon.  Thus, by the time you enter the desired new tiddler title into
> > the input field, the value of the title:{{...}} parameter has already
> > been set.
>
> > Fortunately, I've written a plugin that enables *re-calculation* of
> > the macro parameters whenever you CLICK on the rendered command link:
> >    http://www.TiddlyTools.com/#ClickifyPlugin
> > To use, simply change
> >    <<newTiddler ... title:{{...}} ... >>
> > to
> >    <<clickify newTiddler ... title:{{...}} ... >>
>
> > enjoy,
> > -e
> > Eric Shulman
> > TiddlyTools / ELS Design Studios

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to tiddlyw...@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to