2

When I want to include a collapsed section in markdown as follows

<details>
  <summary>Click to expand!</summary>
  
  I'd like to show an image here, for like this:

<center>![](example.jpg)</center>

</details>

However the image does not appear until I remove the <details> part again. How can I achieve what I want?

cheesus
  • 1,111
  • 1
  • 16
  • 44

2 Answers2

2

You can achieve it. Firstly you need to add four spaces before all those tages and newlines before and after the block. Secondly you can add image differently:


    <details>
    <summary>click to expand</summary>
    <IMG src="blob:https://dev.azure.com/..."  alt="image.png"/>
    </details>

donatasj87
  • 760
  • 9
  • 23
0

Markdown does not offer collapsable sections itself! Take a look at this question that explain how to get collapsable headers in markdown:

Collapsible header in Markdown to html

Fantantonio
  • 377
  • 4
  • 15