BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

[Bug?] Custom inline content missing from ProseMirror's schema

Open ClementEXWiki opened this issue 1 week ago • 0 comments

Hi, I'm currently having an issue that I can't figure out.

I registered some inline contents by following the documentation:

const editor = useCreateBlockNote({
  schema: BlockNoteSchema.create({
    blockSpecs: { ...defaultBlockSpecs, ... },
    inlineContentSpecs: {
      ...defaultInlineContentSpecs,
      subscript: createReactInlineContentSpec(...)
    },
  }),
});

editor.schema.inlineContentSchema.subscript; // OK
editor.pmSchema.nodes.subscript; // Doesn't exist

When inserting an inline content with type subscript (which TypeScript is ok with), I get the following error:

Uncaught Error: node type subscript not found in schema

I'm currently using version 0.42.3.

The way inline contents are defined used to work, now they don't anymore, and I can't figure out why. Custom blocks do get recognized and can be inserted without an issue. I am using editor.insertInlineContent for inserting the custom inline contents, and that throws the error.

Any idea on what could cause this?

ClementEXWiki avatar Jan 14 '26 09:01 ClementEXWiki