Support

Account

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

  • I figured out a better method which allows the field to be enlarged so it’s not a static height. This just removes the inline styling so I can set a height via CSS without the need for !important. Hope this helps someone else!

    
    // Remove ACF inline styles for WYSIWYG
    function my_acf_input_admin_footer() { ?>
    	<script type="text/javascript">
    		(function($) {
    			acf.add_action('wysiwyg_tinymce_init', function( ed, id, mceInit, $field ){
    				$(".acf-field .acf-editor-wrap iframe").removeAttr("style");
    			});
    		})(jQuery);	
    	</script>
    <?php }
    add_action('acf/input/admin_footer', 'my_acf_input_admin_footer');