thank you - very handy little plugin !

Mike

On Jun 8, 4:48 am, vince <[email protected]> wrote:
> It is exactly what I needed, and it is working wonderfully!!
> (I have put it in a new tiddler with a name I liked, tagged as
> systemConfig,
> saved and reloaded)
>
> Thank you very much!!
>
> Vincenzo
>
> On 7 Giu, 19:13, colmjude <[email protected]> wrote:
>
> > > if I use the tiddler macro for transclusion of a non existing tiddler,
> > > like:
> > > <<tiddler nonExistingTiddler>>
> > > nothing is visualized.
>
> > > I would like to have some kind of highlight or error message or
> > > placeholder:
> > > this could be useful to detect mispelling errors, and also as a memo
> > > for
> > > contents not included yet.
>
> > One way to achieve this is the override the transclusion method so
> > that instead of displaying nothing it displays a msg of your choice.
> > I have written a short plugin that achieves this.
>
> > (function(){
>
> >         var macro = config.macros.tiddler;
>
> >         var _transclude = macro.transclude;
> >         macro.transclude = function(wrapper, tiddlerName, args){
> >                 // check to see if empty
> >                 var text = store.getTiddlerText(tiddlerName);
> >                 if(!text){
> >                         
> > config.macros.tiddler.renderText(wrapper,tiddlerName+" does not
> > exist",tiddlerName,params);
> >                 } else {
> >                         // call original
> >                         _transclude(wrapper, tiddlerName, args);
> >                 }
>
> >         };
>
> > })();
>
> > You can change 'tiddlerName+" does not exist"' to any msg you want to
> > display.
>
> > Hope that is what you were looking for...
>
> > Colm

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" 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/tiddlywiki?hl=en.

Reply via email to