On Dec 30, 9:38 am, axelm <[email protected]> wrote:
> I have a plugin (ToDoPlugin) that creates a field called "tdptask0", but
> only when there is a ToDo item.
> What I would like to have is that at the same time a tag would be attached
> to the tiddler.
If the plugin code is already adding a field to the tiddler, it would
seem relatively straightforward to modify the plugin to also tag that
tiddler at the same time.
Assuming you start with just a tiddler title, you need to get the
tidder object (if not already done by the plugin code), add a tag to
that object's 'tags' array, and save it back to the store:
var title="SomeTiddler";
var tid=store.getTiddler(title);
tid.tags.pushUnique("someTag");
store.saveTiddler(tid.title,tid.title,tid.text,tid.modifier,new
Date(),tid.tags,tid.fields);
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
----
TiddlyTools needs YOUR financial support...
Help ME to continue to help YOU...
make a generous donation today:
http://www.TiddlyTools.com/#Donations
Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact
>
> axelm
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" 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/tiddlywiki?hl=en.