> Global macros will come (if I'm not mistaken) in 5.0.8.

Global macros will come with the parser refactoring planned for 5.0.9.

Best wishes

Jeremy.



> Your macro was perfect. The only problem is: You can only use it in the
> tiddler you defined it in. So whatever documentation you found was enough
> for you to do it correct. On tw5magick I have a short example of a
> JavaScript macro. JavaScript macros are global.
>
> On tw5magick you'll also find a bookmarlet which would convert your
> standard macro to JavaScript code:
>
> (function(){
> "use strict";
> exports.name = "QR";
> exports.params = [
>     { name: "text" }
> ];
> exports.run = function( text ) {
>     return "<img src="http://
> chart.apis.google.com/chart?chs=150x150&cht=qr&chl=" + text + "">\n";
> };
> })();
>
>
>
>
>
>
>
>
>>
>>
>>
>> On Friday, February 28, 2014 3:12:23 AM UTC-8, Stephan Hradek wrote:
>>>
>>> Create a tiddler called "QR" containing:
>>>
>>> \define QR(text)
>>> <img src="http://chart.apis.google.com/chart?chs=150x150&cht=qr&;
>>> chl=$text$">
>>> \end
>>> <$macrocall $name="QR" text={{!!title}}/>
>>>
>>>
>>> Anywhere you need a QR code, use it like this:
>>>
>>> {{hello world||QR}}
>>>
>>> The technique is explained on http://tw5magick.tiddlyspot.com in "A
>>> global Macro - with limitations"
>>>
>>  --
> 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/groups/opt_out.
>



-- 
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/groups/opt_out.

Reply via email to