Opened 11 years ago
Closed 11 years ago
#27724 closed defect (bug) (fixed)
Missing resize handle in TinyMCE
Reported by: | toscho | Owned by: | azaozz |
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | 3.9 |
Component: | Editor | Keywords: | has-patch |
Focuses: | Cc: |
Description
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:
- Write the original text in the first editor.
- Make the first editor smaller and the first translation editor larger, write the first translation.
- 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)
Change History (7)
#3
@
11 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).
#5
@
11 years ago
Yes, the setting has changed, but vertical resizing is still enabled by default: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-editor.php#L453
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.
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' ] ] );