Rich Dougherty

Cleaning up Word's HTML

I still need to find an HTML editor that produces clean HTML in the style I like. In the meantime I write blog posts directly in HTML or, for longer posts, I compose in another program and then convert to HTML.

Word produces horrible HTML but here's a trick to tidy it up. Turns out CKEditor has a Paste from Word button especially for this purpose! Just go to the demo page and paste your work, then extract the HTML by clicking Source. The HTML still needs a little cleaning to reach my exacting standards but it's pretty close!

Via Stack Overflow.