Skip to main content
  1. Snippits & Exemplars/
  2. WolfspyreLabs Exemplars/
  3. WolfspyreLabs Shortcodes/

Expand

🐺 expand
help to decrease clutter on screen by hiding part of text.
Expand content by clicking on it.

Thanks to the deep exploration of Nelis Oostens1, There’s a

Quirks of Shortcode Behavior with markdown AND html!
It’s important to note that the impact of the above, is that most use cases of the expand shortcode will now require using the alternative shortcode invocation syntax: {{% %}} in lieu of {{< >}}.
Please read the above link for a more in-depth explanation of the problem, and workaround.

Default #

{{% expand %}}
## Markdown content
Dolor sit, sumo unique ...
{{% /expand %}}

With A Custom Label #

{{% expand "Custom Label" "..." %}}
## Markdown content
Dolor sit, sumo unique ...[^note]


{{% /expand %}}
{{% expand title="Named Custom Label" symbol="⤵" %}}
## Markdown content
Dolor sit, sumo unique ... [^note]
{{% /expand %}}

Default Open With Custom Label #

{{% expand "Custom Label" "..." true %}}
## Markdown content
Dolor sit, sumo unique ...
[Who is this lorem ipsum fellow?][lorem][^lorem]

{{% /expand %}}
{{% expand title="Custom Label" symbol="..." expanded=true %}}
## Markdown content
Dolor sit, sumo unique ...
[Who is this lorem ipsum fellow?][lorem][^lorem]

{{% /expand %}}