Our internal git-lab wiki works with Markdown. I made several summaries of articles and want to post them in our wiki, in such a way that if I click on the header, it should unfold and the text should become visible, basically like in this example
Does Markdown have this expand/collapse/fold function?
Short Answer: No, Markdown does not offer a feature like that directly, but with some work you might be able to build something that works. For a feature like that to work you would need some CSS and/or JavaScript to control the animations, etc.
To make an animated collapsible, add max-height: 0 , overflow: hidden and a transition for the max-height property, to the panel class.
Span-level HTML tags — e.g. <span> , <cite> , or <del> — can be used anywhere in a Markdown paragraph, list item, or header. If you want, you can even use HTML tags instead of Markdown formatting; e.g. if you'd prefer to use HTML <a> or <img> tags instead of Markdown's link or image syntax, go right ahead.
Try:
<details> <summary>Your header here! (Click to expand)</summary> Your content here... > markup like blockquote's should even work on github! more content here... </details>
You can try this sort of thing here:
<details> <summary>Your header here! (Click to expand)</summary> Your content here...</br> (markup only where supported)</br> more content here...</br> </details>
This works for me with Chrome, but may not work yet for other browsers. There are some related posts at github.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With