> Thank you for your suggestion, but - unless I'm doing something wrong
> - the AnnotationsPlugin displays the hidden text as a pop-up. If
> possible, I'd like a way of inserting words directly into the flow of
> text, without line breaks.

Unfortunately, both NestedSlidersPlugin and the core's <<slider>>
macro create a "DIV" element for the 'slider panel' and, when the
'slider button' is clicked, it shows the panel by setting the 'block'
display style.  Thus, the toggled content is always shown with line
breaks above/below.

Fortunately, you *can* use HTML to create your own custom 'onclick'
handler for any given text, like this:
---------------------
There are many <html><a href="javascript:;" onclick="
   var s=this.nextSibling.style;
   s.display=s.display=='none'?'inline':'none';
">frogs</a><span style="display:none">, which are large predatory
birds with razor-sharp teeth</span></html>, in Norfolk.
---------------------

Of course, using this HTML all over the place would be ugly... so, we
can move it into a separate tiddler, [[ToggleText]], which would
contain just:
---------------------
<html><a href="javascript:;" onclick="
   var s=this.nextSibling.style;
   s.display=s.display=='none'?'inline':'none';
">$1</a><span style="display:none">$2</span></html>
---------------------

Note the use of $1 and $2 as *substitution markers*.  This permits you
to pass text parameters using the "with: ..." syntax, by transcluding
ToggleText into your content, like this:
---------------------
There are many <<tiddler ToggleText with: "frogs"
", which are large predatory birds with razor-sharp teeth"
>>, in Norfolk.
---------------------

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

-- 
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