Pre-folded (pre-collapsed) headings

Use case or problem

Some of a note sections (text under headings), e.g., “Used abbreviations”, are expected to be rendered collapsed/folded when a note is opened in the “View” mode.

While callouts can be marked with “-” and “+” characters (e.g., “> [!INFO]- Title” or “> [!INFO]+ Title”) to render them as collapsed/collapsable, this feature is missing for headers.

This need comes from use cases when a collapsed callout cannot be used.
E.g., a list of use abbreviations like the following won’t allow redirection when following the link:

> [!INFO]- Used abbreviations
> - Term1: Definition1 ^Term1
> - Term2: Definition2 ^Term2

See [[#^Term1|the first term definition]]. 

In the above case, only placing the list outside the callout will create functional links.

Similarly, some headings like “Introduction”, “Foreword”, or “Acknowledgement”, etc. could be initially collapsed/folded when opening the note.

Proposed solution

To introduce a new syntax, e.g., “##-”, “##–”, “##+-” to denote:

  • “##-”: a section should be collapsed on page open. All its subsections (nested headings) should be open. Equivalent to optional “##-+” syntax;

  • “##–”: a section and all its subsections (nested headings) should be collapsed on page open.

  • “##+-”: show subsection text, but collapse all of its subsections

  • “##-+”: similar to the above “##-

  • “##+”: similar to plain “##”

  • “##++”: similar to plain “##”

Additionally, it would be nice if block references (^block-id), checkboxes and tasks could also work even when inside the callouts.

Current workaround (optional)

Doesn’t exist.
Attempting to put collapsed callouts under the heading.


## Acknowledgements

>  [!INFO]- Acknowledgements
> Content that is not expected to be immediately accessible when opening the page. 
> Cannot use links to blocks inside the callout. ^useless

Related feature requests (optional)

Current workarounds would be the Creases plugin.

1 Like

Also if you want to open a note with everything folded, you can use QuickAdd’s macros.