I'm using the standard version with firefox v31.0
it's a popup message for me; you shoulb be able to read my pasted code as
well.
On Tuesday, August 19, 2014 2:40:38 PM UTC-5, Ton Gerner wrote:
>
> Hi Ken,
>
> It just works here with Firefox and Chrome.
> Where do you get that error. In the console of the developer tools?
> Are you using the node.js version? I am using a standalone version on
> Windows 7.
>
> Cheers,
>
> Ton
>
> On Tuesday, August 19, 2014 9:28:53 PM UTC+2, Ken Gray wrote:
>>
>> thanks. I'm still getting an error with the code or is firefox just
>> messing it up with its JS engine?
>>
>> On Tuesday, August 19, 2014 2:19:15 PM UTC-5, Ton Gerner wrote:
>>>
>>> Hi Ken,
>>>
>>> Sorry, too fast I started with a red macro and forgot to rename the
>>> "red" macro to "clr" macro.
>>>
>>> Here the revised version:
>>>
>>> Create a macro tiddler, tagged with $:/tags/Macro, containing:
>>>
>>> \define clr(color,text)
>>> @@color:$color$;
>>> $text$
>>> @@
>>> \end
>>>
>>> and use it like this:
>>>
>>> <<clr "red" "This is red">>
>>>
>>> Cheers,
>>>
>>> Ton
>>>
>>>
>>> On Tuesday, August 19, 2014 8:34:14 PM UTC+2, Ken Gray wrote:
>>>>
>>>> that's perfect!!! however, I'm getting 'illegal character' JS error.
>>>> did it mess up your copy/paste?
>>>>
>>>> On Tuesday, August 19, 2014 1:23:10 PM UTC-5, Ton Gerner wrote:
>>>>>
>>>>> Hi Ken,
>>>>>
>>>>> Why not do it in WikiText?
>>>>>
>>>>> Create a macro tiddler, tagged with $:/tags/Macro, containing:
>>>>>
>>>>> \define red(color,text)
>>>>> @@color:$color$;
>>>>> $text$
>>>>> @@
>>>>> \end
>>>>>
>>>>> and use it like this:
>>>>>
>>>>> <<clr "red" "This is red">>
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Ton
>>>>>
>>>>> On Tuesday, August 19, 2014 5:44:38 PM UTC+2, Ken Gray wrote:
>>>>>>
>>>>>> I was doing some work with Danielo RodrÃguez's work with the rojo
>>>>>> macro and since it's pretty easy to build a bunch of scripts for a bunch
>>>>>> of
>>>>>> different colours, couldnt we modify this to pass along colour as a
>>>>>> parameter?
>>>>>> here's his rojo code and how it's called.
>>>>>>
>>>>>> <<rojo "text to put in red color">>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> /*\
>>>>>> title: $:/macros/skeeve/rojo.js
>>>>>> type: application/javascript
>>>>>> module-type: macro
>>>>>>
>>>>>> \*/
>>>>>> (function(){
>>>>>>
>>>>>> /*jslint node: true, browser: true */
>>>>>> /*global $tw: false */
>>>>>> "use strict";
>>>>>>
>>>>>> /*
>>>>>> Information about this macro
>>>>>> This is developed to put some text in red.
>>>>>> */
>>>>>>
>>>>>> exports.name = "rojo";
>>>>>>
>>>>>> exports.params = [
>>>>>> { name: "textToColorize" }
>>>>>> ];
>>>>>>
>>>>>> /*
>>>>>> Run the macro
>>>>>> */
>>>>>> exports.run = function(textToColorize) {
>>>>>> if( !textToColorize) textToColorize = "IMPORTANT";
>>>>>> return spanize(textToColorize,"red");
>>>>>>
>>>>>> function spanize(texto,color){
>>>>>> return "<span style='color:" + color + "'>" + texto + "</span>";
>>>>>> }
>>>>>>
>>>>>> };
>>>>>>
>>>>>> })();
>>>>>>
>>>>>>
>>>>>>
>>>>>>
--
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.