Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#27724 closed defect (bug) (fixed)

Missing resize handle in TinyMCE

Reported by: toscho's profile toscho Owned by: azaozz's profile azaozz
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.9
Component: Editor Keywords: has-patch
Focuses: Cc:


If you create a new instance of TinyMCE in the current trunk, the resize handle is missing. This is a regression, it works in 3.8.

Test code:

add_action( 'add_meta_boxes_post', function() {
	add_meta_box( 'resize_test', 'Resize test', function() {
		wp_editor( '', 'resize_test_editor', [ 'resize' => 'vertical' ] );

This is rather important for translation plugins where a separate editor is used for each language. The typical workflow is:

  1. Write the original text in the first editor.
  2. Make the first editor smaller and the first translation editor larger, write the first translation.
  3. Make the second editor smaller and the third translation box larger …

The only way to resize the editor is to switch to HTML editor (if that is available), use its resize handle and switch back. Not exactly a good user experience.

Attachments (1)

27724.patch (485 bytes) - added by ocean90 10 years ago.

Download all attachments as: .zip

Change History (7)

#1 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 3.9

#2 @ocean90
10 years ago

It seems like before 3.9 the resize handle was enabled by default. The correct code for now is

wp_editor( '', 'resize_test_editor', [ 'tinymce' => [ 'resize' => 'vertical' ] ] );

10 years ago

#3 @ocean90
10 years ago

  • Owner set to azaozz
  • Status changed from new to reviewing

27724.patch changes the default value in wp_editor() for the resize handle.

I think the old TinyMCE setting were theme_advanced_resizing (was true) and theme_advanced_resize_horizontal ( was false).

#4 @ocean90
10 years ago

  • Keywords has-patch added

#5 @azaozz
10 years ago

Yes, the setting has changed, but vertical resizing is still enabled by default:

The problem is on the Edit Post screen the first editor sets resize to false, and the second one (the test) doesn't set it back to true. To do that we can move resize to the "per instance" part of the settings.

#6 @azaozz
10 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 28059:

TinyMCE: make sure vertical resizing and menubar show/hide are set to default for each instance, fixes #27724

Note: See TracTickets for help on using tickets.