Skip to content

Parse custom links defined in inlineContentSpec #2240

@JSHSJ

Description

@JSHSJ

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions