Image inside <details> tag does not shows in preview

I’ve tried obsidian and official markdown way. No one does not works in Preview.

<details><summary>spoiler</summary>content<br>![[Pasted image 20210611103128.png]]</details>


and

<details><summary>spoiler</summary>content<br>![Description](/WebAnalyzer/Attachments/20210611103120.png "title")</details>


Perhaps this is a bug or I entered wrong file path…

image

Mixing HTML and Markdown was never easy. Gruber originally said (simplified): Markdown doesn’t get parsed in block elements, but it does get parsed in inline elements.

CommonMark goes a step further by declaring all kinds of stuff with empty lines between tags, see the docs on HTML blocks.

But even this doesn’t seem to work, I tested lots of combinations that should work. I guess it’s simply a parser bug, you might want to report it.

You can use the Admonitions plugin for this.

Well yes, but still Markdown/HTML should be parsed correctly as per CommonMark spec (which I think Obsidian uses, and which I suppose isn’t happening here).

I need this feature to hide large images under some element that can be expanded when it necesary. Admonitions plugin can highlight but not hide image to prevent long scrolls of document.

Thank you. I’ll report this bug then.

You can create a collapsible admonition. Is the image not collapsing inside it?

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.