Cleaning up after Microsoft

mswordscreenshotI spend a depressing amount of time cleaning up after Microsoft. Specifically, cleaning up the "helpful" HTML code generated by MS Word and/or Internet Exploder on Windows when people copy content from MS Word and paste it into a WYSIWYG editor in Internet Explorer. Helpful, in that it tries (and fails so spectacularly that it boggles my mind how such a "feature" was designed) and more often than not completely borks whatever website is the unsuspecting recipient of the control-V-of-death.

I'm not going to tell people not to use MS Word. It's what people use. Trying to get them to switch to anything else would be tilting at windmills. People use Word.

I'm not going to tell people not to use Internet Explorer. I don't use it. Nobody I work with uses it. But people do - most often, it's people who don't really know what a "browser" is, or that there are options, or that IE is a dangerous beast. They use IE. Fine.

But... I just found a plugin for WordPress that should at least mitigate the damage of the Word/IE duopoly.

Here's an example. I just worked up a simple document in Word. It's pretty fantastic. I'm proud of it. Teacher will give me an A+, for sure. It looks like this:


It's a work of art. Now, I copy the contents of that fantastic piece of literature, and hit control-C to copy it. I switch over to Internet Explorer, and paste it into the Visual editor on a WordPress site. And it looks kinda like hell. The source code of the pasted content looks like this:


WTF? MsoNormal? margins? font-size and font-family? For the love of Xenu, why do you bork my content like this? Now, most people just see the result and say "Man, does WordPress suck. I'm not going to use THAT again." - they don't realize that it's Word/IE that's borking their content, and that it would be equally borked on any web-based content management system that offers a visual wysiwyg editor.

So, after activating the plugin, pasting the same content from my most awesome Word Document into the Visual editor of a WordPress site generates code like this:


It's not perfect, but it's cleaner. Some of the formatting won't be exactly what was in the MS Word document, but that's probably for the better. Apparently, if I used proper styles to define Headings in my document, it would convert them to h1/h2/etc... in the pasted markup. Ahhh... much better.

If you're using WordPress with people that are using MS Word and/or Internet Explorer, get the plugin. You'll be doing them a favour, and saving yourself some grief.

comments powered by Disqus