Posted on 16 July, 2009 By 44 Comments

Don’t Paste Content from Microsoft Word into the WordPress Visual Editor

 

Paste (by SierraBlair)

I incorrectly assumed that it was common knowledge to not paste content from Microsoft Word directly into the WordPress Visual editor but I encounter problems related to this issue so frequently that I thought I should do a quick write-up about the issue.

When you copy and paste content from Microsoft Word, it attempts to preserve the formatting and adds sorts of “ugly” formatting code into the WordPress editor. Frequently this results in the page not displaying properly in Internet Explorer. (It amuses me to no end that Microsoft’s web browser can’t deal with it’s Word Processor formatting code. For some reason Firefox is able to work around it.) So, someone will come to me and tell me that the formatting on the page is messed up or that the sidebar is in the wrong location. It isn’t actually a layout or WordPress code issue but rather that formatting code from Microsoft Word is affecting the layout.

When you use the Visual Editor you won’t see the formatting code. You can, however, determine if this is the problem by switching to the html editor or viewing the source code in the web browser. If you see code that looks like the following, then you can be confident that the Microsoft Word formatting is the cause of the problem.

<p class="MsoNormal" style="margin: 0in 0in 10pt;">
<span style="font-size: small;">Some text here.</span>
<span style="mso-spacerun: yes;"> Some more text here. </span>
<span style="mso-spacerun: yes;">And some more.  </span>

The class and styles that start with Mso giveaway that the content was pasted directly from Microsoft Word. If that class and span information is removed, the formatting problem is corrected.

So, what do you do if you have a lot of content in Word that you want to post on your WordPress site?

  1. Use the paste from Word button the toolbar. You need to click on the Kitchen Sink button to see it.
    visual
  2. Paste the Word content into a text editor like Notepad and then copy and paste it into WordPress.

Have you ever run into this type of formatting problem? Personally I haven’t because I don’t use Microsoft Office and I don’t use the Visual Editor but I encounter this issue almost weekly.

photo credit: SierraBlair

Related posts:

Posted In : WordPress Tips

Did you enjoy this article? I can assist you with your WordPress or Facebook project. Contact me and I will provide you with an estimate. You can also connect with me on Facebook or follow me on Twitter.




StudioPress Premium WordPress Themes

44 Responses to “Don’t Paste Content from Microsoft Word into the WordPress Visual Editor”

Leave a Comment
You may use: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .

CommentLuv badge

About

Kim Woodbridge is an accomplished Information and Technical Consultant specializing in the entire implementation of a WordPress based website including installation, theme design, upgrades, unique customizations and ongoing site maintenance.

Recent Comments

    • Victoria12: Wow! This are so cute. It is so much special when our kids do it on their own and give it us as a surprise gift.. So tou...
    • Catherine: I hope that the page owners have a plan for the transition. One concern is that Facebook doesn’t have a great method of ...
    • harm: You no longer can "Add to My Page" This used to be simple, using the facebook UI. Unfortunately facebook removed thi...
    • Phil Derksen: I was referencing plugin #1 in the list btw. :)...
    • Phil Derksen: Thanks for mentioning my Pin It button plugin. I'd love to hear what people think of it and what they'd like to see adde...

Wordpress Services

  • Installation, upgrades and maintenance
  • Conversion of existing html and css templates
  • Theme and plugin recommendations
  • CSS customizations
  • Troubleshooting and tweaks for unique situations
  • Customization for individual blogging goals and needs
  • Training and advice