What I want is that content should be revealed upon a click, preferably a button. And that it should close itself when I close the tiddler so that next time I open the tiddler again the content should be hidden by default.
This is similar to the tiddler info panel which after opening closes itself upon a click anywhere else and is also closed by default when the tiddler is opened again after closing.
<$button><$action-listops $tiddler="Display Answer" $tags="+[append[$:/tags/TiddlerInfo]]"/><$action-setfield $tiddler="Display Answer" caption="Answer"/><$action-setfield $tiddler="Display Answer" text="{{!!answer}}"/><$action-setfield $tiddler="$:/config/TiddlerInfo/Default" text="Display Answer"/><$action-setfield $tiddler="$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/info" text="show"/>Make Changes</$button>
<p contenteditable="true" class="answer">
answerhere
</p>
Hi,
just to add onto all the tips you have already gotten: The info
tab uses the button popup mechanism to get the behaviour that you
want, so an example would be this (taken from the documentation at
[1]):
<$button popup="$:/SamplePopupState">Open Answer</$button>
<$reveal type="nomatch" text="" state="$:/SamplePopupState">
! This is the Answer
1+1 = 2 most of the time :o
</$reveal>
/Andreas
Hi,
just to add onto all the tips you have already gotten: The info tab uses the button popup mechanism to get the behaviour that you want, so an example would be this (taken from the documentation at [1]):
Another alternative: use the <$appear> plugin by tobibeer