Since I like being orderly, and putting text in collapsed boxes is one of
those ways, I copied slider.handler into a plugin and made the following
changes:
config.macros.slider.handler = function(place,macroName,params)
{
var panel = this.createSlider(place,params[0],params[2],params[3]);
var text = params[1];
var tiddler = null;
if( text.substr(0,5) == 'text:' ){ text = text.substr(5,text.length); }
else { text = store.getTiddlerText(params[1]); tiddler = params[1] }
panel.setAttribute("refresh","content");
panel.setAttribute("tiddler",params[1]);
if(text)
wikify(text,panel,null,store.getTiddler(tiddler));
};
The blue-green highlighted code does not change any functionality, while the
green code does. The syntax works exactly like usual, unless the second
argument starts with "text:". <<slider false [[text:Text]] Text>> Everything
else should be self explanatory. I thought this might be something that
could be implemented into core, since tiddlers are rarely, if ever, given
names starting with "text:". Note that it is case-sensitive, I did that on
purpose, just in case, since even if a name starts with "Text:", I can't see
why it would matter if it were uppercase. Of course, we could do this in a
separate param, but I am tired of typing <<tag SomeTag '' '' -title>>, so I
did it this way.
--
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.