@@ -167,6 +167,41 @@ Here's how they look right after one another:
167167Configuration
168168=============
169169
170+ Below are a few configuration points for ``sphinx-togglebutton ``.
171+
172+
173+ Control the selector text used to make elements toggle-able
174+ -----------------------------------------------------------
175+
176+ By default, ``sphinx-togglebutton `` selects any items that have the class ``.toggle ``
177+ and adds a toggle-button to them. If you'd like to change this class, for example to
178+ select a different kind of HTML element, you may configure this field manually like so
179+ in your ``conf.py `` file:
180+
181+ .. code-block :: python
182+
183+ togglebutton_selector = " your-selector"
184+
185+ For example, if you wanted to add toggle-buttons to all HTML elements that had a
186+ ``toggle-this-item `` class, in *addition * to the default class of ``toggle ``,
187+ you could do so with the following configuration:
188+
189+ .. code-block :: python
190+
191+ togglebutton_selector = " .toggle, .toggle-this-item"
192+
193+
194+ This is what has been done for the toggle-able section below:
195+
196+ .. note ::
197+ :class: toggle-this-item
198+
199+ A toggled note with a custom class to trigger toggling.
200+
201+
202+ Control the togglebutton hover text
203+ -----------------------------------
204+
170205You can control the "hint" text that is displayed next to togglebuttons when
171206their content is collapsed. To do so, use the following configuration variable
172207in your ``conf.py `` file:
0 commit comments