Skip to content

"Edit as HTML" for Stretchy Text block variations deletes content #73768

@mrwweb

Description

@mrwweb

Description

When using the "Edit as HTML" option for a Heading or Paragraph block using the Stretchy Text block variation, the block content is removed.

Step-by-step reproduction instructions

  1. Make a paragraph or heading block
  2. Write anything in it such as "Content"
  3. Apply the Stretchy Text block variation for that block
  4. In the block toolbar kebab menu, select "Edit as HTML"

Observe: the text written in Step 2 is gone. Expected outcome: Content of block is retained.

Screenshots, screen recording, code snippet

Paragraph stretchy text block with content that says Stretchy Text Block being editing as html is an empty paragraph element with the class has-fit-text

Environment info

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Labels

Browser IssuesIssues or PRs that are related to browser specific problems[Block] Stretchy Text[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions