-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Pasting plain text on link breaks link #8158
Comments
@Reinmar it works on the current docs: |
Let's have this bisected. It's semi-serious. It's not a big UX issue, as it worked this way for the last 4 years. However, it's a pity that we broke something that we have just fixed in the last iteration. @jodator, could you bisect it? |
Reason for this is that pasting as plain text clears anything except formatting attributes:
It was introduced as a part of recent paste as plain text improvements. |
I don't understand. We were going in the direction to keep all the formatting on plain text paste. Not lose it. So, if we changed anything it should change it so we keep the formatting. |
The good thing is that this is broken only for links. So, I wouldn't consider this a release blocker and I can also understand how we missed that (since this works for other attributes). So, from my side, no alarm :D |
cc @cksource/ckeditor-5-triage (testing, as above it did not work) |
Looks like there's no such team (not highlighted). The first bad commit is: cb08c3e. |
Yea, I guess that all attributes should be preserved - it's enough to remove the filter function. It will change
I think we should revisit it at the start of next iteration. |
At first glance, it looks like different cases:
ps.: I didn't check the rest of the tests if the above cases are covered. |
To be checked:
|
Another feature that was not mentioned and we should care about is restricted editing. I checked how other text editors handle pasting plain text in relation to links and both Word and GDocs are consistent: link is removed only when pasting with link entirely selected. Otherwise the link is preserved. In fact leaving non-formatting attributes when pasting plain text has some sense:
As for mentions, their attribute is theoretically inherited but is then filter out by the mentions plugin (I'm assuming this is where its post-fixer kicks in). PR with fix in #8272. |
Fix (clipboard): Pasting plain text inside a link or restricted editing editable region will no longer break them. Closes #8158. Tests (link): Added tests for pasting plain text over the link.
📝 Provide detailed reproduction steps (if any)
"example"
)"foo"
)."exam|ple"
).✔️ Expected result
The link is set on whole text (ie on
"examfoople"
)❌ Actual result
The Pasted text breaks the link apart:
📃 Other details
cc @cksource/ckeditor-5-triage
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: