If you want to put Markdown within the folded text there needs to be a blank line after the </summary> tag.
<details markdown='1'><summary>
Summary of folded text
</summary>
Test List
* first item
* second item
#### Test subchapter 1
Test numbered list
1. Numbered list item 1
2. Numbered list item 2
#### Test subchapter 2
Text
</details>
What am I missing in trying to use the above example? On the desktop app it works perfectly when the viewer is side-by-side with the Markdown editor. If I toggle to view only, it defaults to open with no interactivity from the triangle widget. The same file works as expected when accessed on an iPad.
The code works for me in the markdown editor when in split view and viewer only modes. These viewing modes can be accessed when in the markdown editor by using the Toggle Editor Layout button. Each time you press it it will cycle between editor only, split view and viewer only (the sequence can be controlled using View > Layout button sequence)
I think that you are not toggling to viewer only but swapping to the rich-text editor ...
... as it appears that the desktop client rich-text editor cannot display this code properly.
Unfortunately I do not know why it does not work in the rich-text editor or whether it should work.
Thank you @dpoulton. I got so myopic in figuring out code that I completely missed that I wasn't clicking what I thought I was. I knew I'd seen it work early this morning. Thanks for the quick and helpful answer here.