On Tuesday, May 19, 2020 at 7:31:14 AM UTC-7, Reet Pandher wrote:
>
> Just wanted to check if there is any way to add a arrow indicator to the 
> collapsed section to your macro code.
>

Try this:
\define fold(heading, text)
<$reveal type="match" state=<<qualify "$:/state/section$heading$">> text="">
<$button class="tc-btn-invisible" popup=<<qualify 
"$:/state/section$heading$">>>

$heading$ {{$:/core/images/chevron-right}}
</$button>
<$reveal type="nomatch" state=<<qualify "$:/state/section$heading$">> 
text="">

$heading$ {{$:/core/images/chevron-down}}
$text$
</$reveal>
\end 

The difference from Tobias' macro is that it uses two $reveal widgets: the 
first one displays the "collapsed" heading with a right-pointing arrow, 
while the second one displays the "expanded" heading with a down arrow, 
followed by the actual expanded content.

let me know how it goes,

enjoy,
-e

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7587358d-7d58-46d9-abfd-e5acddabe139%40googlegroups.com.

Reply via email to