-
-
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
Ensure that multi-range selections are handled in deleteContent(), insertContent() and modifySelection() #6328
Comments
model.deleteContent()
Note: Standard implementation of those 3 methods may not be completely optimal for table cases. Those implementations should be rudimental and simple. Then, we can extend the behaviour of those methods (they are firing events) from the table selection plugins. For instance, this should probably be the default behaviour:
Now, those implementations will not satisfy table scenarios. There, we need better handling:
It may happen that it's possible for now to work only on the second half of this problem, skipping the default implementations. If that's possible, we should do exactly that and avoid touching the engine at all now. |
@Reinmar you're right. The delete content decoration fixed the typing and delete bugs. While I'm working on it the other thing occurred. To have a nice UX I think that we also need to decorate Anyway, both fixes are short so they should be available soon. |
Linked issue: #3115. |
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue. |
We've closed your issue due to inactivity over the last year. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it). |
📝 Provide a description of the improvement
EDIT: Read @Reinmar's comment and following discussion first.
The scope of this ticket was narrowed to handling multi-range selections in the base methods in the engine.
ATM the
model.deleteContent()
(EDIT: and the two other methods as well) is not aware of multi-range selection. For this I had to manually handle clearing the table cell contents for the clipboard "cut" (ref PR: ckeditor/ckeditor5-table#254).This could be handled by the
model.deleteContent()
so it would iterate over each range from the selection. Handled by theClipboard
plugin here: https://github.com/ckeditor/ckeditor5-clipboard/blob/b1b956716e81f45ce34bcfae1bb13f3348078c21/src/clipboard.js#L130-L132 and by theTableClipboard
plugin here: https://github.com/ckeditor/ckeditor5-table/blob/8e0a92215e4368ec6e7b2ec5fb857bea53a74975/src/tableclipboard.js#L102-L105.If you'd like to see this improvement implemented, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: