On Tuesday, May 28, 2013 4:39:32 AM UTC+2, Arc Acorn wrote:
>
> The subject line is weird since I'm not sure how to phrase it.
>
> I want to change the "DeliciousTagging" plugin which I'll past in at the
> end of the post.
> So that instead of using all the tags in the TiddlyWiki it only uses a
> list of tags in a tiddler.
> However using this method:
> var tags= store.getTiddlerText("tagsDB");
>
> Gives me a list of each letter in the tiddler as it's own tag...
> eg:
> If the tiddler contains:
> TagTest1 TagTest2
>
> I get:
> [[t]] [[a]] [[g]] [[t]] [[e]] [[s]] [[t]] [[1]] [[t]] [[a]] [[g]] [[t]]
> [[e]] [[s]] [[t]] [[2]]
>
A link to the plugin would have been enough.
store.getTiddlerText("tagsDB").readBracketedList(unique);
where unique can be true or false
-----
additional info
The plugin expects tags to be an array of tags, that's why you get the
weird behaviour. getTiddlerText just gets a string.
.readBracketedList(unique) .. is a core function that extends the string
prototype. It is designed to handle a list of tags.
tag1 [[tag with spaces]] tag2 ... should work.
in your debugging tool console try:
"asdf asdf asdf xxx".readBracketedList(true) and
"asdf asdf asdf xxx".readBracketedList(false) to see the difference.
have fun!
mario
readBracketedList(false)
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.