How to Change the Default Font and Size in the WordPress Editor (Advanced Editor Tools)
Content
Many WordPress users install the Advanced Editor Tools (formerly TinyMCE Advanced) plugin to gain more control over their editing experience. A frequent request is to change the default font family and size that appears in the visual editor. This article explains why this happens and provides the most effective methods to customize these defaults.
Why Can't I Change the Defaults in the Plugin Settings?
The Advanced Editor Tools plugin enhances the TinyMCE editor by adding buttons like 'Font Family' and 'Font Size' to the toolbar. However, the plugin itself does not have a setting to change the base or default font that loads when you start editing. This default styling is primarily controlled by your active theme.
Common Solutions for Changing the Default Editor Font and Size
Method 1: Use Your Theme's editor-style.css File
The standard way to style the visual editor is through a file named editor-style.css in your theme's folder. This file is specifically designed to make the editor look more like your live website.
How to do it:
- Access your website's files via FTP or your hosting provider's file manager.
- Navigate to
/wp-content/themes/your-theme-name/. - Look for a file named
editor-style.css. If it doesn't exist, you can create it. - Add the following CSS code to the file, modifying the values to your preference:
body#tinymce.wp-editor { font-family: Arial, Helvetica, sans-serif !important; font-size: 14px !important; } - Save the file and clear your site's cache if you use a caching plugin.
Important Note: Any changes made directly to your theme's files will be overwritten the next time you update the theme. To make this change permanent, you must use a child theme.
Method 2: Use a Custom Function (Advanced)
For more control, you can use the tiny_mce_before_init filter hook in WordPress to modify the TinyMCE initialization settings. This is often done by adding code to your child theme's functions.php file.
How to do it:
- In your child theme, open the
functions.phpfile. - Add the following code snippet at the end:
function my_custom_editor_font( $settings ) { $settings['content_style'] = '.mce-content-body { font-family: Arial, sans-serif; font-size: 16px; }'; return $settings; } add_filter( 'tiny_mce_before_init', 'my_custom_editor_font' ); - Save the file. The editor should now reflect your new default styles.
Method 3: Use a Supplementary Plugin
If editing code is not for you, a supplementary plugin like Advanced TinyMCE Configuration can provide a user interface to adjust these advanced settings. After installing this plugin, you can often find a field to add custom CSS for the editor content under its settings.
Troubleshooting Common Issues
- Font size dropdown is missing: This is a common issue after updating the plugin. Go to Settings > Advanced Editor Tools and drag the 'Font Size' button from the 'Unused Buttons' section back onto your preferred toolbar row.
- Changes don't appear: Ensure you are using a child theme to prevent updates from erasing your work. Also, try holding the Shift key and refreshing your browser to bypass cache.
- Editor font doesn't match my theme: The editor is a separate interface. Using the
editor-style.cssmethod is the best way to make it mimic your theme's front-end styling.
By following these methods, you can successfully change the default font and size in your WordPress editor to create a more comfortable and consistent writing environment.
Related Support Threads Support
-
Is it possible to change the font used by the default editor?https://wordpress.org/support/topic/is-it-possible-to-change-the-font-used-by-the-default-editor/
-
Default Font Size… tried and tried.. and tried..https://wordpress.org/support/topic/default-font-size-tried-and-tried-and-tried/
-
Font is too bighttps://wordpress.org/support/topic/font-is-too-big-1/
-
Remove OpenSans default fonthttps://wordpress.org/support/topic/remove-opensans-default-font/
-
Even and odd font sizes.https://wordpress.org/support/topic/even-and-odd-font-sizes/
-
Changing the display text size in the WYSIWYG editorhttps://wordpress.org/support/topic/changing-the-display-text-size-in-the-wysiwyg-editor/
-
Font Size Drop Downhttps://wordpress.org/support/topic/font-size-drop-down/
-
Font Family inline style issuehttps://wordpress.org/support/topic/font-family-inline-style-issue/
-
Set Font Size and Justification by Default?https://wordpress.org/support/topic/set-font-size-and-justification-by-default/
-
How to inherit font settings from the theme?https://wordpress.org/support/topic/how-to-inherit-font-settings-from-the-theme/
-
Ability to set font sizes not working properlyhttps://wordpress.org/support/topic/ability-to-set-font-sizes-not-working-properly/
-
modify fontsize_formats?https://wordpress.org/support/topic/modify-fontsize_formats/
-
Changed font size not workhttps://wordpress.org/support/topic/changed-font-size-not-work/
-
Not able to customise font sizes on the dropdownhttps://wordpress.org/support/topic/not-able-to-customise-font-sizes-on-the-dropdown/
-
Tiny MCE default font size overrides Theme Settingshttps://wordpress.org/support/topic/tiny-mce-default-font-size-overrides-theme-settings/
-
Change ‘Increase Indent’ Button Setting Defaultshttps://wordpress.org/support/topic/change-increase-indent-button-setting-defaults/
-
How to add more font size in this plugin?https://wordpress.org/support/topic/how-to-add-more-font-size-in-this-plugin/
-
Default Font for editing in the TinyMCE Editorhttps://wordpress.org/support/topic/default-font-for-editing-in-the-tinymce-editor/
-
Letter-spacinghttps://wordpress.org/support/topic/letter-spacing/
-
Change standard display font familyhttps://wordpress.org/support/topic/change-standard-display-font-family/
-
Customizer->Typographyhttps://wordpress.org/support/topic/customizer-typography/
-
Bulk change font-family and font-sizehttps://wordpress.org/support/topic/bulk-change-font-family-and-font-size/
-
How to change TinyMCE Advanced default fonthttps://wordpress.org/support/topic/how-to-cange-tinymce-advanced-default-font/
-
How to set default Font and colors?https://wordpress.org/support/topic/how-to-set-default-font-and-colors/
-
Font size options in classic editor changed to px instead of pt. How to revert?https://wordpress.org/support/topic/font-size-options-in-classic-editor-changed-to-px-instead-of-pt-how-to-revert/
-
Huge text, suddenlyhttps://wordpress.org/support/topic/huge-text-suddenly/
-
how to change wordpress posts default font size?https://wordpress.org/support/topic/how-to-change-wordpress-defaulet-font-size/
-
How to Change ‘H’ Font Size Inputs on Editor?https://wordpress.org/support/topic/how-to-change-h-font-size-inputs-on-editor/
-
Most font size options have disappeared in TinyMCE Advancedhttps://wordpress.org/support/topic/most-font-size-options-have-disappeared-in-tinymce-advanced/
-
Font settings work on individual posts, but not homepagehttps://wordpress.org/support/topic/font-settings-work-on-individual-posts-but-not-homepage/
-
How to Change Default Font/Font Size?https://wordpress.org/support/topic/how-to-change-default-font-font-size/
-
Ability to set Font Size | How is this accomplished?https://wordpress.org/support/topic/ability-to-set-font-size-how-is-this-accomplished/
-
Indent Default Settings have Changedhttps://wordpress.org/support/topic/indent-default-settings-have-changed/