Hello Jeremy

The documentation says : "hasmap of tiddler fields" , not "string
representing hasmap of tiddler fields".
If it expects a string why I can't use the text field of a Json tiddler as
parameter?
El 22/10/2014 11:36, "Jeremy Ruston" <[email protected]> escribió:

> Hi Danielo
>
>>
>> I created a small JavaScript macro to pass a  hasmap based from a  json
>> tiddler. I attached it to this thread. Maybe it can be useful for somebody
>> else.
>>
>
> Your macro returns a hashmap and not a string as it is supposed to. I'm
> afraid it's a bug in the core that it works.
>
> I've fixed it for 5.1.4:
>
>
> https://github.com/Jermolene/TiddlyWiki5/commit/9a067b8dac679e100458b73815b9e5a3764db05c
>
> If you know the names of the fields involved then you can do something
> like this:
>
> <$set currentTiddler="myJsonTemplateTiddler">
> <$button>
> <$action-sendmessage $message="tm-new-tiddler"
> title={{##title}} text={{##text}} tags={{##tags}} 
> anotherfield={{##anotherfield}}
> />
> New tiddler from JSON template
> </$button>
> </$set>
>
> Best wishes
>
> Jeremy.
>
>
>
>> It can be  used like:
>>
>> <$button message="tm-new-tiddler" param=<<getjson "jsonTestTiddler">>>
>> Create new from Json</$button>
>>
>>
>> Where jsonTestTiddler is a json tiddler that contains something like
>> this:
>>
>> {
>> "title":"created from JSON!",
>> "text":"This is nice"
>> }
>>
>>
>>
>>
>>
>>> Great, I'm sorry it's such a slow process :)
>>>
>>> Best wishes
>>>
>>> Jeremy
>>>
>>>
>>>
>>
>> Slow but nice! Too much work for a single man, even with those nice
>> collaborators.
>>
>
>
>
> --
> Jeremy Ruston
> mailto:[email protected]
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" 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/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to