Make WordPress Core

Opened 4 years ago

Last modified 4 weeks ago

#58260 reopened defect (bug)

Enable `elementpath` for the Classic Block TinyMCE editor

Reported by: afercia Owned by: afercia
Priority: normal Milestone: 7.2
Component: Editor Version:
Severity: normal Keywords: has-screenshots has-patch
Cc: Focuses:

Description (last modified by afercia)

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 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 at 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 4 years 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 4 years ago.
Latest Gutenberg: rendered within a modal dialog with empty status bar and no element path.
58260.diff​ (489 bytes ) - added by afercia 4 years ago.
58260 patched.png​ (91.8 KB ) - added by afercia 4 years ago.
Screenshot with patch applied.
text widget.png​ (120.5 KB ) - added by afercia 4 years ago.
The Text widget in the 'Classic' Widgets page, before and after.

Download all attachments as: .zip

Change History (15)

@afercia
4 years ago

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

@afercia
4 years ago

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

#1 @afercia
4 years ago

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

@afercia
4 years ago

Screenshot with patch applied.

#2 @afercia
4 years 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
4 years ago

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

#3 @afercia
4 weeks ago

  • Description modified (diff)

#4 @afercia
4 weeks ago

  • Description modified (diff)

This ticket was mentioned in ​PR #14133 on ​WordPress/wordpress-develop by ​@afercia.


4 weeks ago
#5

Use of AI Tools

None

#6 @afercia
4 weeks ago

  • Milestone Awaiting Review → 7.2

​PR 14133 converts the previous patch to a PR so that it can pass through CI.

#7 @afercia
4 weeks ago

  • Keywords commit added

#8 @afercia
4 weeks ago

  • Resolution → fixed
  • Status assigned → closed

In 64254:

Editor: Restore the Classic Block (TinyMCE) elementpath UI.

The elements path shown in the TinyMCE status bar is a useful tool that helps users with understanding what the current element in the TinyMCE canvas is and allows for easier selection of the elements. It shows the current element, the nesting of the elements, etc.

When the Classic Block in the Block Editor was rendered 'inline' in the canvas, the elementpath UI didn't make much sense and was somewhat obtrusive. Now that the Classic Block is rendered within a modal dialog there is no longer a reason to disable the elementpath UI.

With this change the elementpath UI is enabled again, also in the Text widget in the 'Classic' Widgets page and wherever plugins / themes initialize TinyMCE by using wp_enqueue_editor().

Developed in ​https://github.com/WordPress/wordpress-develop/pull/14133

Fixes #58260.

#9 @afercia
4 weeks ago

In 64256:

Editor: Disable the Classic Block (TinyMCE) elementpath UI.

Reverts [64254].
Re-enabling the TinyMCE elements path UI needs further investigation for consistency with the Classic Editor plugin.

Props johnbillion, afercia.
See #58260.

#10 @afercia
4 weeks ago

  • Keywords commit removed
  • Resolution fixed
  • Status closed → reopened

Reopening for further, careful, consideration after the change has been reverted in [64256].
Any change here should be coordinated with the config for the Classic Editor plugin.

Note: See TracTickets for help on using tickets.