ueberdosis / tiptap

The headless rich text editor framework for web artisans.
https://tiptap.dev
MIT License
26.6k stars 2.23k forks source link

[Bug]: linkify.init not called causing warnings in logs #5450

Open FredrikAugust opened 1 month ago

FredrikAugust commented 1 month ago

Affected Packages

link

Version(s)

2.5.8

Bug Description

We see a lot of the following warnings in our Sentry instance:

linkifyjs: already initialized - will not register custom scheme "mailto" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.

We assume it is from TipTap link extension as we've requested mailto and tel extensions for the extension:

                Link.configure({
                    HTMLAttributes: {
                        // @unocss-include
                        class: 'text-blue-600 hover:underline cursor-pointer'
                    },
                    protocols: ['mailto', 'tel']
                }),

Browser Used

Chrome

Code Example URL

No response

Expected Behavior

It should not throw an error.

Additional Context (Optional)

No response

Dependency Updates

nperez0111 commented 1 month ago

It seems to me that sort of a configuration is not supported by linkify. I don't know it well enough to say if it is valid or not. So please look into it on your own.

Did this work previously, or what changed here?

FredrikAugust commented 1 month ago

Hi. It's based on the example from the TipTap documentation: https://tiptap.dev/docs/editor/extensions/marks/link#protocols. It appears to work just fine, just a warning that is logged which could be avoided.