Disable certain types from default schema

I’d like to only have h1 h2 h3 in our spec, leaving the menu items and # shortcuts as they work with defaultSpec.

In the current git code (not yet in the released version), you can do something like this:

let mySchema = new Schema(defaultSchema.spec.update({
  heading: class extends Heading { get maxLevel() { return 3 } }

I.e. you create a subclass of Heading which overrides the maxLevel. It appears I didn’t document this yet. I’ll add a docstring so that this appears in the reference guide.

1 Like

Disabling hr this seems to work:

  horizontal_rule: null