Skip to content

Parse custom links defined in inlineContentSpec #2240

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions