Preparing the Post Editor for Full iframe Integration

As part of an ongoing effort to modernize the editing experience, WordPress is moving toward running the post editor inside an iframeiframe iFrame is an acronym for an inline frame. An iFrame is used inside a webpage to load another HTML document and render it. This HTML document may also contain JavaScript and/or CSS which is loaded at the time when iframe tag is parsed by the user’s browser.. This work builds upon the original iframe migrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. in the template editor and introduces new compatibility measures in WordPress 6.9, ahead of the full transition planned for WordPress 7.0.

For background, see the original post.

What’s Changing in WordPress 6.9

Starting with WordPress 6.9, several important updates have been introduced to prepare for this change, which will be completed in WordPress 7.0.

Browser console warnings for legacy blocks

To help developers identify legacy blocks, WordPress 6.9 now displays a warning in the browser console when a blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. is registered with apiVersion 2 or lower. This serves as an early signal to update existing blocks before the post editor becomes fully iframed in WordPress 7.0.

When a block is registered with apiVersion 2 or lower, the post editor runs in a non-iframe context as before to maintain backward compatibility. Developers are encouraged to migrate their blocks to apiVersion 3 and test them within the iframe-based editor to ensure full compatibility with future WordPress releases.

See #70783 for more details.

block.jsonJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. schema now only allows apiVersion: 3

Alongside these compatibility measures, the block.json schema has been updated to only allow apiVersion: 3 for new or updated blocks. Older versions (1 or 2) will no longer pass schema validation.

See #71107 for more details.

Why iframe the Post Editor?

The main goal of iframing the editor is isolation. By loading the editor content within an iframe, styles from the WordPress adminadmin (and super admin) no longer interfere with the editor canvas.

This separation ensures that the editing experience more closely mirrors what users see on the front end.

From a technical perspective, the iframe approach offers several benefits:

  • Admin styles no longer leak into the editor, eliminating the need to reset admin CSSCSS Cascading Style Sheets..
  • Viewport-relative units (vwvh) and media queries now behave naturally within the editor.

The iframed Post Editor will make life easier for block and theme authors by reducing styling conflicts and improving layout accuracy.

Props to @mamaduka for helping review this dev-note.

#6-9, #dev-notes, #dev-notes-6-9