Hi tessus,

my idea behind the whole folding stuff is coming from an experience I made with a wysiwyg text editor. It displays a folding arrow besides each headline. With that you can fold down your document to have a better overview and to blend out not needed details.

Do you think that maybe such a behavior (automatically support folding of headlines inside the rendered markdown) can be implemented inside the markdown renderer? This would not need to extend toolbars etc, so the main user will not see any change but the arrows shown in the rendered markdown besides each headline...

For me this would be very great. A second step for this feature could be that the state of the folding would be safed inside the markdown code of the headline. With this it would be like importing antigravity... :snake: :wink:
I think about something like extending the markdown code for headlines with an optional part that tells if the content is folded or not. As soon as the user folds down a headline inside the markdown preview (rendered), the [folded] tag appears inside the editor between the headline start tag ### and the headline text.

@laurent What do you think about that? This could make the work with long notes much more comfortable for power users...

Code

### Standard headline - as supported right now
Text

### [folded] Folded headline
Text which is folded at the moment

Expected rendered markdown

(the displayed arrows should be in the same line as the headline, sorry for that)

Standard headline - as supported right now

Text

Summary of folded text

Text which is folded at the moment

1 Like