What’s broken?
When the heading block spec is configured with allowToggleHeadings: false, the default BlockTypeSelect does not show any heading options.
The schema itself supports normal headings, and headings still work elsewhere, but the formatting toolbar’s block type dropdown does not expose H1-H6.
What did you expect to happen?
BlockTypeSelect should still show normal heading options H1-H6. Only toggle-heading options should be removed when allowToggleHeadings: false
Steps to reproduce
- Create a schema with toggle headings disabled:
const schema = BlockNoteSchema.create({ blockSpecs: { ...defaultBlockSpecs, heading: createHeadingBlockSpec({ allowToggleHeadings: false, }), }, });
- Render the default block type select:
<FormattingToolbarController formattingToolbar={() => ( <FormattingToolbar> <BlockTypeSelect /> </FormattingToolbar> )} />
BlockNote version
0.50.0
Environment
No response
Additional context
No response
Contribution
Sponsor
What’s broken?
When the heading block spec is configured with allowToggleHeadings: false, the default BlockTypeSelect does not show any heading options.
The schema itself supports normal headings, and headings still work elsewhere, but the formatting toolbar’s block type dropdown does not expose H1-H6.
What did you expect to happen?
BlockTypeSelect should still show normal heading options H1-H6. Only toggle-heading options should be removed when allowToggleHeadings: false
Steps to reproduce
const schema = BlockNoteSchema.create({ blockSpecs: { ...defaultBlockSpecs, heading: createHeadingBlockSpec({ allowToggleHeadings: false, }), }, });<FormattingToolbarController formattingToolbar={() => ( <FormattingToolbar> <BlockTypeSelect /> </FormattingToolbar> )} />BlockNote version
0.50.0
Environment
No response
Additional context
No response
Contribution
Sponsor