Support

Account

Home Forums Backend Issues (wp-admin) Change Wysiwyg Background Color

Helping

Change Wysiwyg Background Color

  • I have a dark based theme with a black background (I know… horrible but wasn’t my choice)… I’m trying to style the background of one of my Wysiwyg editors to black so that when I make the text white I can see it.

    I added the class “event_wysiwyg” to the wrapper attributes of the field in question.

    screenshot acf

    I added the following code to functions.php file

    
    function my_acf_admin_head() {
        ?>
        <style type="text/css">
    
        .event_wysiwyg .mceContentBody{
        	background-color: #000 !important;
        }
    
        </style>
        <?php
    }
    
    add_action('acf/input/admin_head', 'my_acf_admin_head');
    

    The class is showing up when I inspect the event_wysiwyg field. If I change the styles of anything outside of the wysiwyg it works but since the wysiwyg is an iframe it doesn’t seem to work. I also tried styling #acf-editor-49_ifr .mceContentBody.

    acf screen 2

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.