Can code blocks be part of a bullet list/collapsible?

Hello @anon35020706 welcome to the community!

Unfortunately, right now, collapsible lists can’t contain codeblocks or any other type of info but text.
If you want to collapse other type of content like code blocks and even images, you would have to use collapsible text. I explain how to do this as follows:

To make something collapsible you have to first change the size to any of the H sizes.
How to make something collapsible

Then you can collapse anything that’s underneath it, including code blocks.
Collapsible code block

As of right now, codeblocks can’t contain H text inside, if you try it will remove the codeblock
Making H something inside a codeblock

The downside of using this instead of collapsible lists is that you are limited to 3 levels (H1, H2 and H3) but you have more freedom to show anything the canvas can offer you like images or multiple columns. You can even show an outline of the content
image

Here you can find a series of videos that can help you kickstart your wiki journey (assuming this is what you want to accomplish here :sweat_smile:)

I hope this sheds some light to you question!

6 Likes