• Resolved digbymaass

    (@digbymaass)


    I had a wee line in functions.php to use a css file for the font I wanted to see in the visual editor –

    // Add styles to the WYSIWYG editor.    
    add_editor_style('tinymce-visual-editor.css');

    Now it’s not working. Can you please suggest a re-wording?

    • This topic was modified 7 years, 4 months ago by digbymaass.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter digbymaass

    (@digbymaass)

    Or is it the css?
    I’m trying:

    body#tinymce.mce-content-body {
    	font-family: Verdana,Arial,Helvetica,sans-serif !important ;
    	font-size: 12px !important;
    }
    
    body#tinymce.wp-editor { 
        font-family: Verdana,Arial,Helvetica,sans-serif !important; 
        font-size: 12px !important; 
    }
    Thread Starter digbymaass

    (@digbymaass)

    I think I fixed it. Originally I had html .mceContentBody. It now needs the hyphens.

    html .mce-Content-Body {
    	font-family: Verdana,Arial,Helvetica,sans-serif !important ;
    	font-size: 12px !important;
    }
    • This reply was modified 7 years, 4 months ago by digbymaass.
    Thread Starter digbymaass

    (@digbymaass)

    I spoke too soon. Just updated tiny mce advanced and now it’s back to the unwanted fonts.

    Plugin Author Andrew Ozz

    (@azaozz)

    These inconsistencies are most likely caused by your browser cache or “network cache” somewhere on the route to your site. Best is to start by refreshing the browser several times while holding Shift (Ctrl for IE/Edge).

    If that doesn’t change the fonts, right-click on a paragraph in the editor and select “Inspect”. That will open the browser tools and clearly show you which styles are applied.

    body#tinymce.mce-content-body {
    	font-family: Verdana,Arial,Helvetica,sans-serif !important ;
    	font-size: 12px !important;
    }

    The above code looks good, however these styles also depend on your theme’s editor-style.css. If it sets specific fonts for paragraphs, you’ll need to override these too.

    Thread Starter digbymaass

    (@digbymaass)

    There’s a ludicrous number of caches operating now! It’s creating all sorts of problems when troubleshooting!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP update causes unwanted font in visual editor’ is closed to new replies.