WordPress.org

Ready to get started?Download WordPress

Forums

Can't resize visual/html editor (6 posts)

  1. Daniel Watrous
    Member
    Posted 3 years ago #

    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?

  2. Mark / t31os
    Moderator
    Posted 3 years ago #

    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).

  3. Daniel Watrous
    Member
    Posted 3 years ago #

    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.

  4. Mark / t31os
    Moderator
    Posted 3 years ago #

    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
    }
  5. Nelu
    Member
    Posted 2 years ago #

    Mark,
    Thanks for posting this solution.

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

  6. Nelu
    Member
    Posted 2 years ago #

    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
    }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags