Hi Simon,
I want to sugest an addition to the SelectThemePlugin. Especially to
applyTheme macro.
/*x*/ .. marks changes
/*+*/ .. marks new
{{{
config.macros.applyTheme = {
label: "apply",
/*x*/ prompt: "apply this theme or palette: " // i'm lazy
};
config.macros.applyTheme.handler =
function(place,macroName,params,wikifier,paramString,tiddler) {
var useTiddler = params[0] ? params[0] : tiddler.title;
/*+*/ var label = params[1] ? params[1] : this.label; // new label
parameter
/*x*/ var btn = createTiddlyButton(place,label,this.prompt
+useTiddler,config.macros.selectTheme.onClickTheme);
btn.setAttribute('theme',useTiddler);
btn.setAttribute('mode',macroName=="applyTheme"?"selectTheme":"selectPalette");
//
a bit untidy here
}
}}}
which results in some more possibilities and documentation
# {{{<<applyTheme TiddlerName label>>}}} applies TiddlerName as a
theme and uses costumized button label
# {{{<<applyTheme {{tiddler.title}} label>>}}} applies actual tiddler
as a theme and uses costumized button label
regards Mario
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywikidev?hl=en.