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

Paste: don't unwrap inline images #19064

Merged
merged 2 commits into from Dec 11, 2019
Merged

Paste: don't unwrap inline images #19064

merged 2 commits into from Dec 11, 2019

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Dec 11, 2019

Description

Fixes #4859.

Currently, on paste or raw-to-block conversion, images (and any other figure content) are extracted from its context and placed in the root. This behaviour is obviously not the best. The reason for this was that aligned images are often nested in a paragraph but appear to be a block (as we want it in Gutenberg). The solution is to only extract aligned images and leave the rest alone.

How has this been tested?

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .

@ellatrix ellatrix added [Type] Bug An existing feature does not function as intended [Feature] Raw Handling Related to the ability to convert content to blocks, paste handling, etc labels Dec 11, 2019
@ellatrix ellatrix merged commit 989132f into master Dec 11, 2019
@ellatrix ellatrix deleted the fix/paste-inline-images branch December 11, 2019 14:56
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Raw Handling Related to the ability to convert content to blocks, paste handling, etc [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert to blocks makes inline images block level
2 participants