Collapsable block of text?

Is there a way to make a block of text collapsable?

So not like a section, because a section will include all text up to the next section. Rather, I want to define a region of text, having a beginning and an end, that I can collapse.

Headings and callouts are collapsible.

Very few programs have this. It requires the ability to store the beginning and end of the user defined collapsible region. WriteMonkey 3 has it - relies on its json database for the storage. Able to keep that in sync with md files, which means that you could use it in conjunction with Obsidian or any other markdown editor - but I doubt it would be worthwhile

Headings define sections, which are open-ended.

How do you collapse a callout? I can’t seem to find any way to collapse it.

Well my thinking is that one could use some particular text incantation to demarcate the beginning and ending of a collapsable region. For example in VS Code, when editing markdown files, you can define a region using

<!-- #region -->
...
<!-- #endregion -->

Then whatever is inside that block can be folded.

HTML comment syntax

1 Like

Not sure what you mean.

Obsidian does not recognize this and does not let me fold it.

Try the following:

> [!info] Not collapsible
> This one can't collapse

> [!info]+ Open at start
> This one can collapse

> [!info]- Closed at start
> This one can collapse

You need to add the + or - after the [! ...] to make it collapsable.

6 Likes

That’s very nice! Thanks, I didn’t know this.

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