Good catch, PMario. and nice plugin. I never use my TW's in readonly mode, 
so I didn't even think of that. I'll update my code with your improvements, 
in case someone wants to have this work with the regular edit command:


config.commands.editTiddler.handler_old = 
config.commands.editTiddler.handler;
config.commands.editTiddler.handler = function(evt,src,title){
config.commands.editTiddler.handler_old.call(this,evt,src,title);
var tiddlerElem = story.getTiddler(title);

if(!readOnly && !!~jQuery(tiddlerElem).attr('tags').indexOf('systemConfig') 
){ return; }

var text = jQuery(tiddlerElem).find('textarea[edit=text]');
var leadingNewline = text.val() ? '\n\n' : '' ;
text.val(text.val() + leadingNewline + '[' + (new 
Date().formatString('YYYY-0MM-0DD hh:mm')) + '] ');
}


There may be other issues that come out in actual use. I'll try to address 
them in this thread if anyone uses this code.

Regards,
axs

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/tiddlywiki/-/0qYjWe6wfGcJ.
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.

Reply via email to