Hi Eric,

Now it works but it completely removes the formatting of the hidden text!! 
😭

On Tuesday, May 19, 2020 at 8:58:45 PM UTC+5:30, Eric Shulman wrote:
>
> On Tuesday, May 19, 2020 at 8:08:15 AM UTC-7, Reet Pandher wrote:
>>
>> I tried it and it displays the heading with the right arrow but when i 
>> click on the heading to expand text, no text appears *and *the heading 
>> disappears as well. When i click anywhere on the screen the heading 
>> re-appears.
>>
>>
> oops!  I left out a closing /$reveal and the $button wrapper around the 
> second heading... here's the fixed macro:
>
> \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>
> <$reveal type="nomatch" state=<<qualify "$:/state/section$heading$">> 
> text="">
> <$button class="tc-btn-invisible" popup=<<qualify 
> "$:/state/section$heading$">>>
>
> $heading$ {{$:/core/images/chevron-down}}
> </$button><br>
> $text$
> </$reveal>
> \end
>
> <<fold "test1" """this is a test""">>
> <<fold "test2" """another test""">>
>
> 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/5df80631-2d72-4b98-8a6b-dcc1a356fd80%40googlegroups.com.

Reply via email to