-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fix/link pasting #4700
Fix/link pasting #4700
Conversation
✅ Deploy Preview for tiptap-embed ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@bdbch looks like there are some failing tests, have you looked into those? |
Just figured out that there a few small bugs with link pasting and validation when using the validate option. I now work on this and will probably get this out too tomorrow. |
Looking at this, it looks like it would resolve the need for #4587 as well? |
@C-Hess I think it does. I'll check again afterwards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wish to fix the bug caused from here.
@@ -26,6 +26,10 @@ export function getMarksBetween(from: number, to: number, doc: ProseMirrorNode): | |||
}) | |||
} else { | |||
doc.nodesBetween(from, to, (node, pos) => { | |||
if (!node || node.nodeSize === undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change caused a bug: #4785
Please describe your changes
This PR fixes issues with paste handling and autolinking with the current version of the Link extension. I refactored the pasting and autolink plugins, reverted my changes from a few months ago to the one before and updated this to support all cases I wanted to fix back then.
To make my changes happen I had to add the clipboard event to the PasteRule handlers. I think this could also be benefitial for other users in the future.
How did you accomplish your changes
How have you tested your changes
I added necessary tests - but you can also check the feature on the Link preview
How can we verify your changes
I added necessary tests - but you can also check the feature on the Link preview
Checklist
Related issues
closes #4627
closes #4541
closes #4484
closes #3634