Hi all,
I was searching for a way to implement a collapsible panel (folding) in Obsidian with any section of the text (currently Obsidian supports folding - if enabled - for lists and headings). To my surprise, by default, Obsidian supports the <details>
and <summary>
markdown syntax.
For example, if you define
<details>
<summary>Collapsible header...</summary>
## Header 2
> This is actual content in markdown
</details>
Results:
Collapsible header...
## Header 2
> This is actual content in markdown
This translates to a collapsible panel (by default collapse), and when you click on the link “Collapsible header”, it will expand in the preview mode with the actual content.
However, I found that the markdown content within the details is not rendered properly, i.e. it renders verbatim rather than translating the markdown.
Am I missing something? Or this is not fully supported by Obsidian yet?
Thanks!