Skip to content

Paste: don't unwrap inline images#19064

Merged
ellatrix merged 2 commits intomasterfrom
fix/paste-inline-images
Dec 11, 2019
Merged

Paste: don't unwrap inline images#19064
ellatrix merged 2 commits intomasterfrom
fix/paste-inline-images

Conversation

@ellatrix
Copy link
Copy Markdown
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] Paste 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] Paste [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