BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Parse custom links defined in inlineContentSpec

Open JSHSJ opened this issue 2 months ago • 10 comments

Is your feature request related to a problem? Please describe. We have a custom link type, called a reference. I tried creating a custom inline content spec for it, but the parse function never gets elements with tagName === "A". I assume they are parsed by the built-in link inline content before.

  • Is there a way to change the parsing priority?
  • (additional) is there a way to use one of the Toolbars to detect custom nodes? The LinkToobar only detects URLs, which is not unique in our case.

Describe the solution you'd like Allow adding a parsing priority, either through their position in BlockNoteSchema.create or in createReactInlineContentSpec, so I can parse custom links.

Describe alternatives you've considered Of course it might be possible by wrapping the component in a span, but that is not what we want ideally. We're coming from TipTap, so I might try adding it as TipTap Extension, but I prefer your way of defining custom content.

JSHSJ avatar Dec 08 '25 14:12 JSHSJ