Collapsible elements
Collapse pieces of content to hide information that is not essential for most of your readers, such as additional reference information that supports the main content.
Writerside enables you to collapse the following elements: chapters, procedures, code blocks, and definition list items. Set collapsible="true"
on an element to render it collapsed by default with the icon that expands the content inside this element.
You can change the default state for collapsible blocks by setting default-state="expanded"
on a collapsible element. Do this when you want readers to be able to collapse information that is otherwise important.
Semantic markup example:
Markdown example:
How it will render:
Some chapter
Some content.
Semantic markup example:
How it will render:
Some procedure
Do this
Do that
By default, collapsible code blocks render the first line in collapsed state, but you can set a different collapsed state using the collapsed-title
attribute.
Semantic markup example:
Markdown example:
How it will render:
Besides making the whole definition list collapsible, you can set the default state for every item individually.
Semantic markup example:
How it will render:
- Expanded by default
This is the definition of the first term.
- Collapsed by default
This is the definition of the second term.