Repository navigation
Edit as HTML: Add a modal to edit block HTML in a larger editor - #85392
Open
dhruvikpatel18 wants to merge 3 commits into
Open
dhruvikpatel18 wants to merge 3 commits into
dhruvikpatel18 wants to merge 3 commits into
Conversation
🤖 PR meta 🤖🎉 PropsUnlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @jdcohan, @SergeGusev. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Updated as activity occurs, without notifying anyone named here. Add the |
dhruvikpatel18
marked this pull request as ready for review
October 22, 2026 13:23
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Closes #41056
Adds an "Expand HTML editor" button to the block toolbar while a block is being edited as HTML. It opens the block's HTML in a large "Edit HTML" modal, with Update and Cancel actions. The existing inline HTML editor is unchanged.
Why?
The inline "Edit as HTML" textarea is only as wide as the block. In a narrow block, such as a 25% column, the markup wraps into a tall strip a few words wide, and long URLs and attributes break across many lines. That makes the markup hard to read and edit.
The Custom HTML block already solved the same problem with a modal editor (#73108). This brings that approach to "Edit as HTML" for every block that supports HTML editing.
Testing Instructions
<em>), and click Update. Confirm the inline HTML editor shows the new markup.<p>to<div>), and click Update. Confirm the block shows the same invalid content warning that the inline editor gives.Screenshots or screencast
Screen.Recording.2026-10-22.at.10.30.33.AM.mov
Screen.Recording.2026-10-22.at.6.44.20.PM.mov
Use of AI Tools
Implemented with assistance of Claude Code.