Skip to main content

Collapsible Headings

Collapsing of a Heading component allows you to reduce the visual clutter in your document. Bangle implements it by hiding every node after the selected heading until a heading of the same level or higher is not encountered.

Try some of the following things:

  • Click the ▶️ to collapse various levels of headings, click again to uncollapse.

  • Try cutting pasting a collapsed heading and expect to see the collapsed data retained.

See API docs:

  • 📖 The example below takes advantage Prosemirror's Decorations.
  • 📖 Heading component docs .