1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-29 00:33:15 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/widgets/CheckboxWidget (tag Mode).tid

18 lines
921 B
Plaintext
Raw Normal View History

caption: <<.attr tag>>
created: 20230314171205017
description: tab
modified: 20230317161122617
tags: CheckboxWidget
title: CheckboxWidget (tag Mode)
!!<<.link "<<.attr tag>> Mode" "CheckboxWidget (tag Mode)">>
Using the checkbox widget in tag mode requires the <<.attr tag>> attribute to specify the name of the tag. The checkbox will be checked if the tiddler specified in the <<.attr tiddler>> attribute has the specified tag and unchecked if it does not.
This example creates a checkbox that flips the <<.tag done>> tag on the current tiddler:
<<wikitext-example-without-html """<$checkbox tag="done"> Is it done?</$checkbox>""">>
When the attribute <<.attr invertTag>> is set to <<.value yes>>, the checkbox will be checked if the tiddler does <<.em not>> have the specified tag and unchecked if it does.
<<wikitext-example-without-html """<$checkbox tag="done" invertTag="yes"> Is it not done?</$checkbox>""">>