I recently started writing content that required I get down and dirty with HTML in the WordPress edit screen. Initially, it was pretty nasty. WordPress just loves to do it’s own thing and get rid of your own custom code.
1. Kill the ‘visual editor’
Pop over to your profile in WordPress and turn ON ‘Disable the visual editor when writing’.
2. Install ‘WP Editor’ from wpeditor.net
There are a couple of HTML editor plugins but I found WP Editor to be the best.
Couple this with Raw HTML plugin and you’ll have ultimate control over what WordPress spits out. I keep ‘automatic paragraphs’ ON for post posts just so I don’t jave to add my own paragraph elements on every line.
Using this in fullscreen mode is a dream. Imagine Sublime Text 2 for editing your posts and pages, it’s just wonderful.
Alternatives
FYI I did toil with WP Markdown for a while, but as the markdown language cannot have custom HTML elements like classes and IDs this was no good.
I still recommend markdown as a better alternative to the default WordPress editor if you don’t need the type of control I crave, it’s a great way to ‘just write’.
Warning!
This seems to kill the spell checker in Firefox (haven’t tested in Chrome) so look out for any typos/derps.