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

Model#insertContent() should properly auto-paragraph nodes #8958

Merged
merged 3 commits into from
Feb 2, 2021
Merged

Conversation

niegowski
Copy link
Contributor

Suggested merge commit message (convention)

Fix (engine): Pasting formatted single-line text over a widget should not split it into multiple paragraphs. Closes #8953.


Additional information

@niegowski niegowski requested a review from scofalik February 1, 2021 09:06
Comment on lines +257 to +261
if ( this.position.parent != node || !this.position.isAtEnd ) {
// Algorithm's correctness check. We should never end up here but it's good to know that we did.
// At this point the insertion position should be at the end of the last auto paragraph.
// Note: This error is documented in other place in this file.
throw new CKEditorError( 'insertcontent-invalid-insertion-position', this );
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a clone of the previous check that is in _mergeOnRight() but this is a slightly different scenario.

@scofalik
Copy link
Contributor

scofalik commented Feb 2, 2021

LGTM. Do we want @ckeditor/qa-team to check it before merging?

@niegowski
Copy link
Contributor Author

Do we want @ckeditor/qa-team to check it before merging?

I guess we should 😉

@FilipTokarski
Copy link
Member

LGTM 👍

@scofalik scofalik merged commit dfe8035 into master Feb 2, 2021
@scofalik scofalik deleted the i/8953 branch February 2, 2021 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single paragraph with different text formatting breaks it into multiple paragraphs while pasting on image
3 participants