Hi
I've got a very nice script from Mark S.
1)
I would like to use it from a button in a custom toolbar for a
tiddler.
It should convert the list in the tiddler to a row of tags in the same
tiddler.
2)
It could also reside in the sidebar - If it did, it should prompt
twice 1) for the sourcetiddler and 2) for the targettiddler.
3)
Maybe an even better solution would be to have a newTiddlerbutton,
which I would call: List2Tags - to open a new tiddler, which I would
fill with my list and when I click done - the script will run on the
tiddler content - delete the original list - while putting it into the
tagline - and refresh it - to be able to display the result at once..
Now the script needs a tiddler which already exists and it doesn't
refresh, nor does it delete the sourcelist..
The script looks like this:
<script>
var t=store.getTiddlerText('SourceTiddler','');
var target = store.getTiddler('TargetTiddler') ;
var taglist = t.split('\n') ;
for(var i=0 ; i < taglist.length ; i++) {
if ( taglist[i] && ! target.tags.contains(taglist[i]) )
target.tags.push( taglist[i] ) ;
}
return 'Mischief Managed' ;
</script>
YS Måns Mårtensson
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---