Ok, I've been fiddling around with ImportTiddlersPlugin, and I added
this code:
inbound.fields['
server.id'] = ""; // remove the original id (if one
exists)
inbound.fields['server.type'] = 'cctiddly';
inbound.fields['server.host'] = window.url;
inbound.fields['server.workspace']= window.workspace;
// do the import!
store.suspendNotifications();
var newT = store.createTiddler(inbound.title);
newT.text=inbound.text;
newT.modifier = inbound.modifier;
newT.modified = inbound.modified;
newT.tags = inbound.tags;
newT.fields = inbound.fields;
newT.created = inbound.created;
plugin.saveTiddler(newT);
You can see that I added something just above and below the 2 lines:
// do the import!
store.suspendNotifications();
- With this I can import a tiddler, and then edit any existing tiddler
and when I click done on the edit, the imported tiddler gets saved as
well. But there are some quirks.. like I can't seem to retrieve a
tiddler with a " at the start after it's been saved to the database,
and if I check phpmyadmin, the tiddler fields aren't exactly the same,
there are more useless fields.
I'm not sure what of this is that works, and what's just bloat just
yet, I'm still fiddling with this code, but I think I'm tinkering in
the right place.
S.