vendredi 30 septembre 2016

TiddlyWiki: Working with checkboxes and custom plugins

I am trying to write a custom plugin using the Classic version of TiddlyWiki. The plugin is supposed to react to checkboxes when clicked, but I can only get the following code to work properly when the page is saved and refreshed. I need to this work when the checkbox is clicked. Is there some kind of onclick/onchange event I can work with when writing the plugin? I do not have much experience when it comes to creating plugins in TiddlyWiki.

if (config.options.chkHideSidebar===undefined)
config.options.chkHideSidebar=false;

if (config.options.chkHideSidebar===false)
alert('false'); // altering CSS stylesheet when clicked
else if (config.options.chkHideSidebar===true)
alert('true'); // altering CSS stylesheet when clicked




Aucun commentaire:

Enregistrer un commentaire