BACK TO DIRECTORY

TwoTen Inline Canvas for ACF Blocks

by carmex

0.0
(0 ratings)

WordPress 7.1 renders the post editor canvas inside an iframe on every
post, unconditionally. ACF PRO cannot initialise its field forms inside
that iframe, so from 7.1 every ACF block is forced into preview mode with
its fields squeezed into the right-hand sidebar — the familiar inline
“edit mode” disappears.

WordPress 7.1 still ships the old non-iframed canvas rendering path; core
just stopped using it. This plugin serves a copy of the wp-editor script
bundle with the single flag that controls this flipped
(shouldIframe: true becomes false), which restores the pre-7.1
editing experience: ACF block fields render inline in the main canvas,
full width, with working WYSIWYG, media pickers and repeaters.

Safety properties

  • No core files are modified on disk. The patched copy lives in
    wp-content/uploads/twoten-inline-canvas/ and core stays pristine
    (wp core verify-checksums passes).
  • Scoped: only post.php / post-new.php receive the patched bundle.
    The site editor — which requires the iframe — and all other admin
    screens get stock WordPress.
  • Self-healing: the patched copy is keyed to the WordPress version and
    bundle mtime, so it regenerates automatically after every core update.
  • Fail-safe: the patch is only applied when the flag appears exactly once
    in the bundle. If a future WordPress changes that code, the plugin
    serves the stock bundle and the editor simply returns to the iframed
    canvas — nothing breaks.
  • Does nothing at all on WordPress below 7.1 (safe to install ahead of an
    upgrade) and when SCRIPT_DEBUG is enabled.

Block requirements

Inline edit mode is an ACF Blocks v2 behaviour. ACF PRO 6.8+ defaults
block.json blocks to v3 on WordPress 7.1+, which removes edit mode by
design (iframe or not) — every block becomes a preview with an
“Edit Block” modal. This plugin therefore pins the default back to v2
via ACF’s acf/blocks/default_block_version filter. Your blocks should:

  • not set "blockVersion": 3 explicitly in block.json (an explicit
    value is respected and keeps that block in v3);
  • set "acf": { "mode": "edit" } (and ideally "supports": { "mode": false })
    so blocks open as forms rather than previews.

Blocks saved while stuck in preview mode carry "mode":"preview" in their
saved markup, which overrides the block default. For blocks whose mode
toggle is hidden ("supports": { "mode": false }) the plugin resets that
to the block’s configured mode when the post is parsed in the editor, and
the content self-heals on the next save. Blocks that allow toggling keep
the saved choice. To clean everything in one go instead:

wp search-replace '"mode":"preview"' '"mode":"edit"' wp_posts --include-columns=post_content

Updates

Updates are delivered through the WordPress.org plugin directory like any
other plugin. Updates do not apply when the file is run as a must-use
plugin.

When to remove this plugin

This is a compatibility shim, not a permanent architecture. Remove it once
ACF PRO supports field editing inside the iframed canvas — check the ACF
changelog before major WordPress upgrades. After any WordPress core
update, open a post in the editor and confirm blocks still show inline
forms; if the fail-safe has kicked in they will show previews again, and
the plugin needs a new patch pattern for that WordPress version.

Disabling programmatically

add_filter( 'tts_inline_canvas_enabled', '__return_false' );

Screenshots

ACF block fields rendering inline in the editor canvas (edit mode)
instead of being forced into the sidebar.

ACF block fields rendering inline in the editor canvas (edit mode) instead of being forced into the sidebar.

Plugin Details

Active Installs
0
Total Downloads
27
Version
1.4.0
Requires WP
6.0
Requires PHP
7.4
Tested Up To
7.1
Added
2026-09-16
Last Updated
2026-09-16 8:44am GMT

Ratings

5
0
4
0
3
0
2
0
1
0