Limit heading levels in blocks


how can I limit the levels of headings in blocks? I want the user to use headlines <h3> to <h6> only. I found the defaults here but don‘t understand how to change them.

My blueprint so far:

    type: blocks
      - heading
      - textarea

This is the default blueprint for the heading block type:

icon: title
wysiwyg: true
preview: heading
    label: field.blocks.heading.level
    type: select
    empty: false
    default: "h2"
    width: 1/6
      - h1
      - h2
      - h3
      - h4
      - h5
      - h6
    label: field.blocks.heading.text
    type: writer
    inline: true
    width: 5/6
    placeholder: field.blocks.heading.placeholder

Create a custom /site/blueprints/blocks/heading.yml, copy the original code into it and make your changes as required.

This will then affect all headings in all block fields.

If you only want to make changes in a single block field, you can follow the docs here:

1 Like

Note that the solution proposed does not work for headings in the writer field. For that, there’s a pending feature request here in Nolt. If you’d like to see first-class support for this in the writer field, be sure to go there and upvote it!