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]: Wrong parsing of clipboard on paste with multiple links #5710

Open
1 task done
bgeffrault opened this issue Oct 9, 2024 · 0 comments
Open
1 task done

[Bug]: Wrong parsing of clipboard on paste with multiple links #5710

bgeffrault opened this issue Oct 9, 2024 · 0 comments
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

@bgeffrault
Copy link

Affected Packages

core, extension-highlight, extension-link, extension-mention, extension-placeholder

Version(s)

2.8.0

Bug Description

I copy multiple links with the a tags from an email from gmail
Eg with my clipboard content:

<meta charset='utf-8'><a class="o-link o-link-uri" href="https://www.linkedin.com/feed/update/urn:li:activity:7249017478775775232" rel="noopener noreferrer" target="_blank" style="box-sizing: inherit; background-color: rgb(255, 255, 255); outline: 0px; color: rgb(0, 147, 238); text-decoration: underline; transition: color 0.2s linear; cursor: pointer; -webkit-user-drag: none; word-break: break-all; font-family: &quot;Crisp Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal;">https://www.linkedin.com/feed/update/urn:li:activity:7249017478775775232</a><br class="o-new-line" style="box-sizing: inherit; color: rgb(0, 0, 0); font-family: &quot;Crisp Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><br class="o-new-line" style="box-sizing: inherit; color: rgb(0, 0, 0); font-family: &quot;Crisp Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><a class="o-link o-link-uri" href="https://www.linkedin.com/posts/hermkensmarieeve_concours-leadership-ia-activity-7249021018235641856-gFTV?utm_source=share&amp;utm_medium=member_desktop" rel="noopener noreferrer" target="_blank" style="box-sizing: inherit; background-color: rgb(255, 255, 255); outline: 0px; color: rgb(0, 147, 238); text-decoration: underline; transition: color 0.2s linear; cursor: pointer; -webkit-user-drag: none; word-break: break-all; font-family: &quot;Crisp Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal;">https://www.linkedin.com/posts/hermkensmarieeve_concours-leadership-ia-activity-7249021018235641856-gFTV?utm_source=share&amp;utm_medium=member_desktop</a><br class="o-new-line" style="box-sizing: inherit; color: rgb(0, 0, 0); font-family: &quot;Crisp Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><br class="o-new-line" style="box-sizing: inherit; color: rgb(0, 0, 0); font-family: &quot;Crisp Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><a class="o-link o-link-uri" href="https://www.linkedin.com/posts/hermkensmarieeve_innovation-transformationnumaezrique-leaders-activity-7248015884609282048-vQvR?utm_source=share&amp;utm_medium=member_desktop" rel="noopener noreferrer" target="_blank" style="box-sizing: inherit; background-color: rgb(255, 255, 255); outline: 0px; color: rgb(0, 147, 238); text-decoration: underline; transition: color 0.2s linear; cursor: pointer; -webkit-user-drag: none; word-break: break-all; font-family: &quot;Crisp Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal;">https://www.linkedin.com/posts/hermkensmarieeve_innovation-transformationnumaezrique-leaders-activity-7248015884609282048-vQvR?utm_source=share&amp;utm_medium=member_desktop</a><br class="o-new-line" style="box-sizing: inherit; color: rgb(0, 0, 0); font-family: &quot;Crisp Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><br class="o-new-line" style="box-sizing: inherit; color: rgb(0, 0, 0); font-family: &quot;Crisp Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><a class="o-link o-link-uri" href="https://www.linkedin.com/posts/innovia-acad%C3%A9mie_innovation-transformationnumaezrique-leaders-activity-7248011146333454337-b-z-?utm_source=share&amp;utm_medium=member_desktop" rel="noopener noreferrer" target="_blank" style="box-sizing: inherit; background-color: rgb(255, 255, 255); outline: 0px; color: rgb(0, 147, 238); text-decoration: underline; transition: color 0.2s linear; cursor: pointer; -webkit-user-drag: none; word-break: break-all; font-family: &quot;Crisp Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal;">https://www.linkedin.com/posts/innovia-acad%C3%A9mie_innovation-transformationnumaezrique-leaders-activity-7248011146333454337-b-z-?utm_source=share&amp;utm_medium=member_desktop</a>

Then I paste it in the editor and I got a wrong parsing.

I reproduce it on the demo env 'Try it'. If you inspect the parsing done, the result is only one tag and inside of it all the links as text.
image

It looks similar to this issue: #4769

Browser Used

Chrome

Code Example URL

No response

Expected Behavior

Correct parsing with an "a" tag for each link

Additional Context (Optional)

No response

Dependency Updates

  • Yes, I've updated all my dependencies.
@bgeffrault bgeffrault 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 Oct 9, 2024
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
None yet
Development

No branches or pull requests

1 participant