Support

Account

Home Forums General Issues How to set a custom height for WYSIWYG? Reply To: How to set a custom height for WYSIWYG?

  • Reviving this thread in case this helps – was looking for the same thing, a way to reduce the initial height of WYSIWYG fields, as it makes the admin overly bulky for small content fields that need more control than Text Area.

    In digging, I found that wp-editor supports editor_height since v3.5 https://codex.wordpress.org/Function_Reference/wp_editor

    Would that allow for ACF to add height as an admin option?

    In the meantime, I’m using the following, but it prevents the client from being able to drag the size larger.

    /*-----------------------------------------------------------------------------------*/
    /*	Force Height of ACF WYSIWYG Fields
    /*-----------------------------------------------------------------------------------*/
    add_action('admin_head', 'my_custom_wysiwyg');
    function my_custom_wysiwyg() {
      echo '<style>
        .wp-editor-container textarea.wp-editor-area {
          height: 100px !important;
        } 
      </style>';
    }

    Thanks for the help,
    Jonathon