Editor scrolling:

- Add a Screen Option to turn it on/off, and on()/off() methods from JS. Store the user preference.
- Fix delayed calls to resize() in the TinyMCE autoresize plugin.
See #28328.

git-svn-id: https://develop.svn.wordpress.org/trunk@29336 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2014-08-01 02:42:30 +00:00
parent a8a936ebc5
commit c94edd08bd
6 changed files with 187 additions and 57 deletions

View File

@@ -490,7 +490,7 @@ do_action( 'edit_form_after_title', $post );
if ( post_type_supports($post_type, 'editor') ) {
?>
<div id="postdivrich" class="postarea edit-form-section">
<div id="postdivrich" class="postarea edit-form-section<?php if ( get_user_setting( 'editor_expand', 'on' ) === 'on' ) { echo ' wp-editor-expand'; } ?>">
<?php wp_editor( $post->post_content, 'content', array(
'dfw' => true,
@@ -499,7 +499,7 @@ if ( post_type_supports($post_type, 'editor') ) {
'editor_height' => 360,
'tinymce' => array(
'resize' => false,
'wp_autoresize_on' => ! empty( $_wp_autoresize_on ),
'wp_autoresize_on' => ( ! empty( $_wp_autoresize_on ) && get_user_setting( 'editor_expand', 'on' ) === 'on' ),
'add_unload_trigger' => false,
),
) ); ?>