Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: YouTube video pasting broken with Link extension since 2.1.0-rc.2 #4347

Closed
1 of 2 tasks
ahukkanen opened this issue Aug 18, 2023 · 2 comments · Fixed by #4354
Closed
1 of 2 tasks

[Bug]: YouTube video pasting broken with Link extension since 2.1.0-rc.2 #4347

ahukkanen opened this issue Aug 18, 2023 · 2 comments · Fixed by #4354
Assignees
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

Comments

@ahukkanen
Copy link

Which packages did you experience the bug in?

extension-link, extension-youtube

What Tiptap version are you using?

2.1.X

What’s the bug you are facing?

The paste handler configured for the YouTube extension does not work when Link extension is used as well. The paste rule is defined here:

nodePasteRule({
find: YOUTUBE_REGEX_GLOBAL,
type: this.type,
getAttributes: match => {
return { src: match.input }
},
}),

Instead of the YouTube video being embedded automatically on paste, a link appears pointing to the YouTube URL.

This works fine with 2.0.4 but in any version 2.1.X it is broken (broken since stable release 2.1.0 and from RC release 2.1.0-rc.2).

What browser are you using?

Chrome

Code example

https://codesandbox.io/s/objective-edison-zxxc94

What did you expect to happen?

I would expect the YouTube extension's paste rule to work alongside the Link extension.

Anything to add? (optional)

Here is a working example using version 2.0.4 (the same example using 2.0.4):
https://codesandbox.io/s/reverent-dust-j9cmm5

To drill down even deeper, it seems to also work with 2.1.0-rc.1 but it is broken in 2.1.0-rc.2.

Potentially breaking change between these releases #3975 based on the autolink.js change history within the extension-link package.

Did you update your dependencies?

  • Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
@ahukkanen ahukkanen added 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 labels Aug 18, 2023
@github-project-automation github-project-automation bot moved this to Triage open in Tiptap Aug 18, 2023
@bdbch
Copy link
Member

bdbch commented Aug 19, 2023

Thanks @ahukkanen – I created a fix for this in #4354

@ahukkanen
Copy link
Author

Fixed by #4354. Fix shipped in v2.1.11.

@github-project-automation github-project-automation bot moved this from Triage open to Done in Tiptap Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants