The jQuery.makeCollapsible system allows for elements to be made expandable/collapsible, by default adding a button labelled "Expand" or "Collapse", depending on current state, optionally overridden by data-collapsetext and data-expandtext. However, when one uses customtoggle to allow the button to be placed elsewhere, there is no way to have the button display "Expand" or "Collapse" depending on state.
Possible solutions:
- Have custom toggles default to the standard "Expand"/"Collapse" text if certain conditions are met.
- Have custom toggles check for the data-collapsetext / data-expandtext attributes, and overwrite the contents with them when they're present.
- Set up some fancy thing that displays particular child elements of any custom toggle depending on state.
Currently, the only way to have it work is to write up some complicated TemplateStyles CSS, which is quite difficult for the average editor to do.