I stumbled across a problem using QuickEdit_split in TiddlySpace. The
new tiddlers created by _split did not get saved on the server because
the fields of the new tiddlers were not properly set. The code below
deals with this.
I'd like to suggest something like store.saveNewTiddler defined in the
core along the lines of the function definition below. It would
surely simplify matters for plug-in developers.
//to fix a problem using QuickEdit_split in TiddlySpace, the fragment
below replaces
//store.saveTiddler(tid,tid,txt,config.options.txtUserName,new Date(),
[],{}); with
var saveNewTiddler = function(title, text, tags, fields){
var newTiddler = store.saveTiddler(title, title, text,
config.options.txtUserName, new Date(), tags,
merge(merge({},fields),config.defaultCustomFields));
autoSaveChanges(null, [newTiddler]);
};
//defining a function of possible general utility which is used below
in Quick Edit_split as
saveNewTiddler(tid,txt); //in the context of QuickEdit_split
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" 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/tiddlywikidev?hl=en.