BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Support for folding?

Open danvk opened this issue 2 years ago • 3 comments

In IDEs, blocks are often associated with folding. For example in VS Code:

Unfolded: image

Folded: image

Is there support for folding in BlockNote? Has anyone built this feature on top of BlockNote? Would it be straightforward to add?

danvk avatar May 18 '23 13:05 danvk

Hi Dan! Good suggestion. I think there would be several ways to add this:

Fold nested elements I think this makes most sense, add an option to fold nested (indented) element above a parent element

Create "foldable" elements This would be similar to the "Toggle node" in Notion for example; create a separate node type that's foldable

Make headings foldable Automatically make contents below headings foldable (i.e.: treat content between headings as "sections"


Let me know if you see other options. What way of folding would you be most interested in?

YousefED avatar May 18 '23 13:05 YousefED

+1'ing that this would be great to have. I agree that option 1 - folded nested elements - makes the most sense.

KNWR avatar Nov 23 '23 12:11 KNWR

Create "foldable" elements This would be similar to the "Toggle node" in Notion for example; create a separate node type that's foldable

This variant best for my case, need feature "nested blocks"

Inaztm avatar Jan 12 '24 09:01 Inaztm