Hi,
I am trying to make a box for inputting new tiddlers (tiddler titles only).
It has to operate from the Main Menu and I want it to create the tiddler
"silently" (without opening it).
I have tried QuickNotes (http://tiddlytools.com/#QuickNotePlugin), it adds
however user name and date as the title and opens the tiddler once created
and I don't know how to tweak that.
I used Tobi Beer's Notes (http://lastfm.tiddlyspot.com/#Notes) and it looks
promising, but has to be tweaked.
I hacked and mutilated the code and got it working in the "story" part of
the TW. It only works on the Main Menu when the tiddler containing it is
also being displayed for viewing.
Sorry if this all sounds complicated.
Here is the re-purposed code:
<html><nowiki><form id="Notes" style="width:100%;height:20px;">
<input title="message title" name="msgTitle" type="text" cols="60" style="
width:90%;height:20px;padding:0px;margin-bottom:1px;margin-right:2px;border:
1px solid #CCC;"><input title="tags added to message" name="msgTags" type=
"text" cols="60" style="display:none;width:0%;height:20px;padding:0px;margin
-bottom:0px;border:0px solid #CCC;"><br/>
<textarea title="message body" name="msgBody" rows="1" cols="0" style="
display:none;width:0%;height:0px;padding:0px 0px;margin:0px;float:left;
border:0px solid #CCC;"></textarea>
<input class="button" type="button" value="ok" style="font-weight:bold;font-
size:1.0em;width:9%;height:22px;float:right;border:1px solid #CCC;margin:-23px
0px 0px 0px;" title="click to save this message" onclick="
var note=this.form.msgBody.value;// if (note=='') return;
var tags=this.form.msgTags.value.readBracketedList();
tags.push('day');
var tid=story.findContainingTiddler(place).getAttribute('tiddler');
var who=config.options.txtUserName;
var when=new Date();
var title=this.form.msgTitle.value;
if (title=='') title=when.formatString(' YYYY-0MM-0DD 0hh:0mm:0ss');
var msg=config.messages.overwriteWarning.format([title]);
if (store.tiddlerExists(title) && !confirm(msg)) return;
store.saveTiddler(title,title,note,who,when,tags,{});
this.form.msgTitle.value='';
this.form.msgTags.value='';
this.form.msgBody.value='';
this.form.msgTitle.focus();">
</form></html>
I would be grateful for any pointers.
Thank you.
Johannes
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
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/3763e329-7f63-4871-aa42-5172d9f16165%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.