Thank you for your reply.

I added the action-sendmessage widget and weirdly it works when I try it in 
the preview pane but not once I have saved the tiddler...

Here is what I tried in full:

<$reveal type="nomatch" state="$:/state/SampleReveal2" text="show">

<$button set="$:/state/SampleReveal2" setTo="show">
<$action-sendmessage $message="tm-add-tag" $param="tagname"/>
Show me
</$button>

</$reveal>
<$reveal type="match" state="$:/state/SampleReveal2" text="show">

<$button set="$:/state/SampleReveal2" setTo="hide">
<$action-sendmessage $message="tm-remove-tag" $param="tagname"/>
Hide me
</$button>

! This is the revealed content
And this is some text

</$reveal>



On Sunday, May 19, 2019 at 1:55:14 AM UTC+1, TonyM wrote:
>
> Place these (untested) after the <$button> or the variation within the button 
> definition itself.
>
> Tiddler is not specified making it apply to the currentTiddler
>
>
> Tag method
>
> <$action-sendmessage $message="tm-add-tag" $param="tagname"/>
> or
> <$action-sendmessage $message="tm-remove-tag" $param="tagname"/>
>
>
>
> Field method
>
> <$action-setfield $field="fieldname" text="show"/>
> Or
> <$action-setfield $field="fieldname" text="hide"/>
>
> Regards
> Tony
>
>
> On Sunday, May 19, 2019 at 10:35:59 AM UTC+10, TonyM wrote:
>>
>> A quick answer is to add an action to each button that adds or removes 
>> the required tag.
>>
>> Personally I prefer setting the reveal state to a value in a field on the 
>> current tiddler so as to not over burden the tags.
>>
>> Regards
>> Tony
>>
>>

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/bbb5b7b4-ab5e-4a7c-8be5-d23da4387c66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to