ueberdosis / tiptap

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

[Bug]: Wrong link on paste with hard break #5679

Open Ste35 opened 1 day ago

Ste35 commented 1 day ago

Affected Packages

extension-link

Version(s)

2.6.6

Bug Description

Hi, I'd like to report a possibile bug that occurs when pasting a link with a new line separated by an hard break (I hope it's not a duplicate!).

When coping and pasting together:

the pasted link "extends" to the first word of the following line and the link pasted is incorrect: tiptap-issue-1 (in this case, the pasted link will be https://google.comThis)

The problem doesn't show up if the two lines are in different paragraphs: tiptap-issue-2

You can also see the same issue in the Tiptap public demo: https://templates.tiptap.dev/ tiptap-issue-3

Is this an actual issue or am I missing something? Thank you for your work!

Browser Used

Chrome

Code Example URL

https://stackblitz.com/edit/react-xqt1gu?file=src%2FApp.js

Expected Behavior

The copied link and the following line should be kept as in the original source.

Additional Context (Optional)

No response

Dependency Updates