-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Paragraph shouldn't be pasted into the list item #730
Comments
This is bad. Not a regression, but still important because it will lead to crashes. |
This is a tricky case. We start with:
And insert:
At some point of the
So, it's a valid content. But then, we came to a point when we want to merge the block in which insertion started with the first element of the content that was inserted. Normally it works fine – if there was no
However, due to the
I've known about these cases for a long time but ignored them due to their complexity and because we didn't have bQs back then (so that case was not possible to reproduce). Right now, we need to do something that will prevent incorrect merges. The easiest solution I can think if is to not merge when that might lead to an incorrect content, so a new method The result will be then:
Which I think is reasonable. There might be better solutions in terms of final result, but none seem to be feasible. |
Fix: `Model#insertContent()` will not merge nodes if the model after the merge would violate schema rules. Closes ckeditor/ckeditor5#730.
🐞 Is this a bug report or feature request? (choose one)
💻 Version of CKEditor
1.0.0-alpha2
📋 Steps to reproduce
Heading 1
create new block quote with paragraph inside.Heading 1
.UL List item 1
andUL List item 2
.✅ Expected result
Content should be pasted properly.
❎ Actual result
<p>
element has been pasted to the<li>
element.📃 Other details that might be useful
GIF

Other information
OS: Windows 10, MacOS X
Browser: All browsers
This bug was reproducible before the engine refactoring.
The text was updated successfully, but these errors were encountered: