Skip to content

Prepending text in a GB image block breaks GB editing #723

Open
@hypest

Description

@hypest

Expected

Adding text in front of the image in a GB image block should not break the GB editing experience (This block appears to have been modified externally. placeholder).

Observed

Adding text in front of the image in a GB image block causes the This block appears to have been modified externally. plceholder to appear in GB, breaking the editing flow.

Reproduced

  1. Load the following html snippet in html mode:
<!-- wp:image {"align":"center"} -->
<figure class="wp-block-image aligncenter">
  <img src="https://cldup.com/cXyG__fTLN.jpg" alt="Beautiful landscape" />
  <figcaption>If your theme supports it, you'll see the "wide" button on the image toolbar. Give it a try.
  </figcaption>
</figure>
<!-- /wp:image -->
  1. Switch to visual mode and place the cursor in front of the image
  2. Insert one or more characters
  3. Switch to html mode and notice that the character(s) entered are inbetween the starting GB comment and the <figure> element. That is not valid for GB and causes the "modified externally" placeholder to appear.

Tested

Nexus 5X on Android v7.1.2, Aztec v1.3.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    GutenbergThis issue is also valid importing Aztec in Gutenberg

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions