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.

Reply via email to