hackmd-io-issues icon indicating copy to clipboard operation
hackmd-io-issues copied to clipboard

Make more kinds of blocks collapse-able in edit mode

Open Kaiserouo opened this issue 6 months ago • 0 comments

Is your feature request related to a problem? Please describe. HackMD already has some support for folding/collapsing blocks in the edit section, specifically headers and style curly brackets. But there seems to be no support for folding blocks of text in:

  • Alert section (:::spoiler)
  • Code blocks (```)
  • Quote section (>)
  • Multi-layer bullet points (-)
  • Math blocks ($$)

They often contain a lot of text, and sometimes (especially :::spoiler and code blocks), their content takes up too much space and would be hard to navigate through all these contents before reaching the later part of the notes.

Describe the solution you'd like I want the aforementioned blocks to be foldable, like how in the current version of HackMD, you can fold the whole header / paragraph by clicking the arrow on the left, next to the line numbers.

Describe alternatives you've considered Maybe you can make the part you wanna collapse h6 (######), but that wouldn't make that much sense if there are more support for other kinds of blocks.

Additional context

I use Google Chrome 128.0.6613.86 (64-bit), Windows 11 Pro 23H2 (OS build 22631.4112)

https://github.com/user-attachments/assets/11aaf1ea-dd88-4c33-b118-1ca1c3884429

Kaiserouo avatar Sep 01 '24 08:09 Kaiserouo