One of the coolest things about WordPress 3.2 is its “distraction-free writing” mode. I’ve been eagerly awaiting using this feature on my own sites for months. Unfortunately, WordPress 3.2 also shipped with a font change for the HTML editor to a monospace font, which isn’t so distraction free when you’re trying to write.
Sure, I could switch over to the visual editor, but I hate the visual editor more than I hate people who kill kittens for fun. I haven’t used it in at least four years and will likely not be switching over any time soon.
There is a growing group of people who would like to see the font reverted. However, Matt Thomas does have a reasonable argument for the change to a monospace font.
Let’s not focus on the argument over what fonts to use though. WordPress makes this extremely easy to change. It only takes a few lines of code.
How to change the font
In your theme’s functions.php file or in a plugin file, add the following lines of code to change the font stack.
add_action( 'admin_head-post.php', 'my_fix_html_editor_font' );
add_action( 'admin_head-post-new.php', 'my_fix_html_editor_font' );
function my_fix_html_editor_font() { ?>
<style type="text/css">#editorcontainer #content, #wp_mce_fullscreen { font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; }</style>
<?php }
This will give you a font stack of:
- Georgia
- Times New Roman
- Bitstream Charter
- Times
- serif
You are, of course, free to change this font to whatever you want. I’m about to play around with my font size and line height a bit to make the writing experience even more enjoyable.
What the change looks like
The original font will look like the following screenshot.

The new look, using the code from above, will look like the next screenshot.

Either or works for me. Though it took me a a few weeks to adjust to the new fonts and admin layout.
I’ve been testing 3.2 for some time now and have already switched to 3.3 aortic dissection.
At first I kind of freaked out about the new font around b2 or RC1… then got used to it… If any clients complain I’ll throw in the function but otherwise I’ll sit on it.
Thx for the codez
Very cool, Justin. I installed the new version of Wordpress but i didn’t really like the default font it has now; it reminds me of the visual editor, which i don’t like either.
I tested the code as a standalone plugin and it works. Thanks for sharing.
Thanks for this, very cool… I think I’m about to go change my editor font to Panic Sans
I strongly prefer it, then again I spend a lot of my day already reading Consolas inside of my text editor.
I don’t even use a monospace font for coding. I’ve just never found one that I feel comfortable with.
You should definitely give a try to Espresso Mono font. It’s the best font for coding i’ve ever seen. Really like its beauty.
The only reason I changed the monospace is that on XP it looks like crap.
I don’t like the change, because the text is very difficult to read. And especially if the purpose is blogging and reading what you are writing… this just doesn’t work.
I tried the code in function.php, didn’t work.
Whilst I do not like the change , something bland does give you the motivation to make a quick change to what you really do like , so that can’t be all bad ..
“…but I hate the visual editor more than I hate people who kill kittens for fun.”
Made me laugh.
Thank You!! Going to use this on all my wp installs.
hi :
nice post , but i think it will best to use the built-in function add_editor_style to add our own css file and add it to the theme ..
so that when people need to change anything they can just change it from the css file not the function file ..
We’re talking about the HTML editor in this post. The editor style applies to the visual editor.
okay ..
i think i got it wrong ..
thanks for correcting me ..
Thank you so much.
I’m still on XP ( and will be for awhile. )
That mono font rendering is killing me until I found this post.
I read what Nacin wrote on the forum and wondering why not otherwise.
If this was meant specifically for coders, why not let people with coding skills make change to it, but instead forcing people with less coding skills ( like me ) to look around and find a solution and do the fixing myself ?
Hey, thanks for the tip. Worked like a charm.
I was finding the new mono-spaced font a lot harder to read, almost like I was writing my posts in Notepad, which is not the friendliest plain-text editor out there. :/
Wonderful and works like charm
Very helpful, thanks a lot! However, it only seems to work when creating or editing articles. Whenever I try to edit a comment, the text is still displayed in the ugly monospace default font, regardless of the theme I use. Is there another line of magic code for fixng that as well?
I do this but everything gone. now when I go to my homepage http://www.siniqradio.com it says: Parse error: syntax error, unexpected ‘}’ in D:inetpubvhostssiniqradio.comhttpdocswp-contentthemesnews-childfunctions.php on line 47
just this.
what should I do? what is this? I also can’t login to my wordpress. please help
I discovered today that WP 3.3 overrides this fix. Don’t know why. Hope you will.
#editorcontainer is now #wp-content-editor-container. Swap it into the declaration above and you’ll be up and running in WP 3.3.