Question if this can be done

I was using inkdrop for a while. One of the plugins was pretty cool as it created this see attached it toggles the sections open and closed.

I was wondering if there is a plugin, i've looked I don't see one. Or if there is a way to do this with markdown.

Thanks

Copied from this post

Summary 1

<details markdown='1'>
<summary>Summary of folded text</summary>
Extended information which is folded by default.
</details>

Summary 2

<details markdown='1' open>
<summary>Summary of folded text</summary>
Extended information which is open by default.
</details>

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>
4 Likes

Beautiful!! Thank you very much friend,

Maybe the spoilers plugin should also be noted here, it does a similar job...

1 Like

That's true, but the above method works on mobile clients as well.

3 Likes

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.

@inivium welcome to the forum.

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)

image

I think that you are not toggling to viewer only but swapping to the rich-text editor ...

image

... 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.