Starting with 3.2, the WordPress HTML editor has become MonoSpaced. Yay! Problem is that it looks best on a non-Windows PC, so someone of my friends who happen to be Windows users have the grumpy.
I made an htmleditor.php
file and tossed it into my mu-plugins
folder. You can use the folder in single and multisite WordPress, and it makes any php files in there act similar to your functions.php
. I find it preferable since you don’t have to port to a new theme, should you change it. Read What is the MU-PLUGINS folder? if you need more help.
<?php /* Plugin Name: HTML Editor Plugin URI: https://halfelf.org/hacks/wordpress-html-editor-font/ Description: I don't like the HTML editor Font on Windows Version: 1.0 Author: MA Epstein Author URI: https://ipstenu.org/ */ function html_editor_admin() { ?> <style type="text/css">#content #editor, #editorcontainer #content, #editorcontainer textarea#content, #editorcontainer textarea, div#postdivrich.postarea #editorcontainer textarea#content { font: normal 13px/1.5 verdana !important; }</style> <?php } add_action('admin_head', 'html_editor_admin'); ?>
You can obviously change font: normal 12px/1.5 Monaco, monospace !important;
to whatever you like.
Enjoy!