Ok Here is my button reveals plugin, attached, with documentation, stored 
in a bundle

Please provide feedback, then I will publish in the user forum.

*Provides two macros to create buttons to toggle content displayed in 
tiddlers or anywhere in your wiki.*
   
   - *toggle-global buttonname* sets a state tiddler - of the name 
   "$:/config/button-buttonname-state"
   - *toggle-here buttonname* sets field in the current tiddler - of the 
   name "button-buttonname-state"

*both buttons also toggle visibility of html elements with an 
ID=buttonname-true or ID=buttonname-false* 
But of course Use list and reveal as you wish by referencing the local 
field or state tiddler

<$list filter="[is[current]button-buttonname-state[true]]" variable=nul> 
Show when true 
</$list>

<$list filter="[{$:/config/button-buttonname-state}] -[[false]]" 
variable=nul>
Show when true
</$list>

<$reveal type="match" state="$:/config/button-buttonname-state" text="true">

! This is the revealed content
And this is some text

</$reveal>


This seems to me so useful it may deserve an approved version in the native 
wiki.

Regards
Tony


On Wednesday, June 26, 2019 at 8:16:42 AM UTC+10, TonyM wrote:
>
> Folks,
>
> I have a macro that provides easy, tidy and on demand buttons to toggle 
> content. I will share it shortly after a little self documentation. I also 
> need to find a smart way to permit applying a style or class to the button 
> in either state. Too many parameters in a macro would make it unfriendly.
>
> Regards
> Tony
>
>
> On Tuesday, June 25, 2019 at 9:47:44 PM UTC+10, TonyM wrote:
>>
>> Mario
>>
>> I agree with you in principal but I do belive the new mathematics 
>> operators are in some ways a minimum requirement. Until now a number of 
>> simple things you would expect were not possible without plugins.
>>
>> Some of Evans formula features should be in the core but a lot of it also 
>> makes sense as a plugin.
>>
>> In the button solution I have developed it is very light weight, and 
>> would I believe make a lot of things easier that could justify being in 
>> native tiddlywiki but that discussion is for another time. 
>>
>> Regards
>> Tony
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" 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/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/5e2405eb-fe5a-497f-ab03-0b89d0a932e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: button-reveals.bundle.json
Description: application/json

Reply via email to