Make WordPress Core

Opened 12 months ago

Last modified 12 months ago

#58260 assigned defect (bug)

Enable `elementpath` for the Classic Block TinyMCE editor

Reported by: afercia's profile afercia Owned by: afercia's profile afercia
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-screenshots has-patch
Focuses: Cc:

Description

So far, the Classic Block renders the TinyMCE editor within the WordPress Editor canvas. In this case, disabling the TinyMCE elementpath makes perfectly sense, as it would be perceived as an extraneous I element, in this context. For this reason, elementpath is explicitly disabled in the TinyMCE settings, see https://github.com/WordPress/wordpress-develop/blob/d744c4d39729e2f1df76d93d99560d791ece3043/src/wp-includes/class-wp-editor.php#L933

See first screenshot for the current state.

However, on latest Gutenberg, the Classic Block opens a modal dialog. The TinyMCE editor renders within the modal dialog. In this context, there's no reason to disable elementpath. The elements path shown in the TinyMCE status bar is a useful tool that helps users with selecting the elements within the editor.

Currently, the status bar shows ad the bottom of the editor, but it's empty. See second screenshot.

Attachments (5)

current no element path.png (82.9 KB) - added by afercia 12 months ago.
Current state: rendered in the editor canvas with no status bar and no elements path.
gutenberg empty status bar.png (132.8 KB) - added by afercia 12 months ago.
Latest Gutenberg: rendered within a modal dialog with empty status bar and no element path.
58260.diff (489 bytes) - added by afercia 12 months ago.
58260 patched.png (91.8 KB) - added by afercia 12 months ago.
Screenshot with patch applied.
text widget.png (120.5 KB) - added by afercia 12 months ago.
The Text widget in the 'Classic' Widgets page, before and after.

Download all attachments as: .zip

Change History (7)

@afercia
12 months ago

Current state: rendered in the editor canvas with no status bar and no elements path.

@afercia
12 months ago

Latest Gutenberg: rendered within a modal dialog with empty status bar and no element path.

@afercia
12 months ago

#1 @afercia
12 months ago

  • Keywords has-patch added
  • Owner set to afercia
  • Status changed from new to assigned

@afercia
12 months ago

Screenshot with patch applied.

#2 @afercia
12 months ago

One more place where this change will restore the elements path is the Text widget in the 'Classic' Widgets page and wherever plugins / themes initialize TinyMCE by using wp_enqueue_editor().

@afercia
12 months ago

The Text widget in the 'Classic' Widgets page, before and after.

Note: See TracTickets for help on using tickets.