Skip to content

Block Library: Deprecate Classic Block and TinyMCE #78067

@tyxla

Description

@tyxla

Goal

To deprecate and later remove the Classic Block (making it fully opt-in), and lay the groundwork towards making TinyMCE also fully opt-in.

Rationale

We recently started hiding (#77911) the Classic Block from the inserter, but this is just the first step on a long path.

Why make Classic Block opt-in

  1. Hiding from the inserter only addresses the inflow. It stops new Classic blocks from being created, but the per-load tax is unchanged: every editor still registers core/freeform, hydrates its edit component, and pulls the TinyMCE-bridging modal into the block-library bundle. On a site with zero Classic content, that's all dead weight.
  2. Architectural consistency - every other block in Core is a pure block-tree node. Freeform is the lone exception - opaque HTML rendered through a separate editor. Keeping it in the default registry contradicts the block-first model.
  3. Classic usage is shrinking. New Classic blocks will no longer be insertable by default. The convert-to-blocks feature has been the migration path for years. The set of posts that need Classic block registered is finite and getting smaller - a precondition for safely flipping registration off by default.
  4. Maintenance leverage - every block-library refactor has to special-case core/freeform. Each carve-out is small; the cumulative cost is real.
  5. It paves the road for loading TinyMCE on demand. Classic Block is the only consumer of window.tinymce / window.wp.oldEditor in Gutenberg. As long as Classic is registered by default, Core has no signal it can use to skip TinyMCE on the post screen.

Why make TinyMCE opt-in

  1. It's probably the largest single asset Core ships to the post screen that the modern editor doesn't otherwise need.
  2. The implicit-global API surface (window.tinymce, window.wp.oldEditor, window.wpEditorL10n.tinymce) is read by an unknown number of plugins. Loading it by default keeps that API alive forever. Loading it on demand makes the dependency explicit and auditable.
  3. It's already conditional in spirit. Core's _WP_Editors::enqueue_default_editor() was designed around an era when every post screen needed a WYSIWYG fallback. That premise is gone for block-editor screens.

Plan and next steps

  • Hide the Classic block
  • Experiment 1: Deprecate the Classic Block
  • Experiment 2: Remove the Classic Block
    • Deregister the Classic block
    • Introduce a plugin that registers the Classic block as an opt-in mechanism
    • Adding "convert to blocks" and "convert to html" in the Missing block
    • Make available for everyone (remove the experiment wrapper)
    • Aim to make this part of a future WordPress release (7.2 or in the future)
  • Additional related work
    • Finish the move of freeform to its own package: Move freeform block to separate package #70603
    • Cleanup old TinyMCE / classic block compatibility layers
    • Experiment with making core/html block to be the default instead of core/freeform
  • Make TinyMCE opt-in (long-term)
    • Update all TinyMCE assets to be enqueued and loaded the traditional way, ensuring the classic editor still works
    • Conditionalize/fix any usages in core that rely on TinyMCE to always be loaded
    • Work with the plugins using TinyMCE to start enqueueing it explicitly
    • Dequeue TinyMCE assets while leaving them registered
    • Aim to make this be tested thoroughly and land in a future WordPress release

Metadata

Metadata

Assignees

Labels

[Block] ClassicAffects the Classic Editor Block[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions