[Bug]: autolink does not work and throw an exception #4343
Labels
Category: Open Source
The issue or pull reuqest is related to the open source packages of Tiptap.
Type: Bug
The issue or pullrequest is related to a bug
Which packages did you experience the bug in?
core, extension-link, react
What Tiptap version are you using?
2.1.2
What’s the bug you are facing?
With
autolink
enabled for link extension, whenever I inputted a URL manually and then type a space (expecting that it will turn into a link automatically), the editor removed the latest space and the link remain unlinked.There is an error in the console.
I first encountered this issue in version
2.1.0
, and then upgraded to2.1.1
and2.1.2
with no luck.and here is the stack trace I captured at the exact time it is going to throw (
type
isundefined
, but it is trying to invoketype.isInSet
).I dig into it a bit, it seems that the cause is that,
newState.schema.marks
does not have the propertycode
.https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-link/src/helpers/autolink.ts#L93
What browser are you using?
Chrome
Code example
No response
What did you expect to happen?
the inputted text should turn into a link node without any error
Anything to add? (optional)
paste link does work ok
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: