WordPress.org

Support

Support » How-To and Troubleshooting » Can't resize visual/html editor

Can't resize visual/html editor

  • When creating or editing posts and pages I used to be able to change the size of the text editior (in either HTML or Visual mode). When I did this it would remember my size choice from one page load to another.

    Now on some of my blogs I can’t resize anymore. On others I still can. I would love to know how to get this feature working again!

    Here’s a screenshot of it working:
    http://screencast.com/t/euIcw9DorAR8

    Here it is broken:
    http://screencast.com/t/3RdlPFksWH

    Any ideas?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The resize has only ever been avaiable under Visual mode, it’s never been shown whilst in HTML mode as long as i can remember.

    NOTE: Users of Firefox won’t have to worry about this as of version 4.0(of Firefox), a native resize option will be provided in the browser on any textarea shown on a webpage(it won’t persist, but it’s convenient nonetheless).

    Mark,

    You’re right. I have to laugh at myself a little for not noticing that.

    I use chrome which allows resize of native textarea, but like you mentioned, it doesn’t persist.

    You can always just add some CSS via hook to increase the textarea size if you want to…

    add_action('admin_print_styles-edit.php','increase_textarea_css');
    add_action('admin_print_styles-post-new.php','increase_textarea_css');
    
    function increase_textarea_css() {
    	?>
    	<style type="text/css">
    	textarea#content { height:600px!important; }
    	</style>
    	<?php
    }

    Mark,
    Thanks for posting this solution.

    Is there a way of applying this only to a specific post type?

    Nevermind.

    I figured it out:

    add_action('admin_print_styles-edit.php','increase_textarea_css');
    add_action('admin_print_styles-post-new.php','increase_textarea_css');
    
    function increase_textarea_css() {
    	?>
    	<style type="text/css">
    	<?php if (($_GET['post_type'] == 'my_custom_post_type') || ($post_type == 'my_custom_post_type')) : ?>
    	textarea#content { height:600px!important; }
    	<?php endif; ?>
    	</style>
    	<?php
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can't resize visual/html editor’ is closed to new replies.