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

DataController#deleteContent should leave a paragraph if the entire content was selected #4110

Closed
pomek opened this issue Jul 13, 2017 · 2 comments · Fixed by ckeditor/ckeditor5-engine#1022
Assignees
Labels
package:engine type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Milestone

Comments

@pomek
Copy link
Member

pomek commented Jul 13, 2017

The whole ticket has been described here: https://github.com/ckeditor/ckeditor5-typing/issues/61

Agreed solution: https://github.com/ckeditor/ckeditor5-typing/issues/61#issuecomment-314699729

@pomek pomek self-assigned this Jul 13, 2017
@Reinmar Reinmar changed the title engine/controller/deletecontent.deleteContent should ensure that paragraph is left DataController#deleteContent should leave a paragraph if the entire content was selected Jul 13, 2017
@pomek
Copy link
Member Author

pomek commented Jul 13, 2017

After a F2F talk with @Reinmar, we defined these TCs:

  • <h1>[xx</h1><p>yy]</p> => <p>[]</p>
  • <h1>[xx]</h1> => <h1></h1>
  • <limit><h1>[xx</h1><p>yy]</p></limit> => <limit><p>[]</p></limit>
  • no paragraph allowed in the limit/root => do not change anything (as it is now)
  • all edge cases where selection isn’t really containing the whole content or when only a single element is selected:
    • e.g. <image></image><h1>[xx</h1><p>yy]</p> => <image></image><h1>[]</h1>
    • e.g. <h1>[<image></image>xx]</h1> => <h1>[]</h1>

Also, we agreed that $root could be added to Schema.limits to simplify limit checks.

@pomek
Copy link
Member Author

pomek commented Jul 13, 2017

=> means Backspace.

Reinmar referenced this issue in ckeditor/ckeditor5-engine Jul 19, 2017
Feature: `DataController#deleteContent()` will leave a paragraph if the entire content was selected. Closes #1012.

On the occasion `$root` element has been marked as a limit element in Schema in order to simplify the checks.
Reinmar referenced this issue in ckeditor/ckeditor5-enter Jul 19, 2017
Internal: Aligned implementation to changes in ckeditor/ckeditor5-engine#1012.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added this to the iteration 11 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:engine labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:engine type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants