WordPress – Avoiding Microsoft code in posts & pages

Those of you who like to copy & paste your posts from Microsoft Word have probably noticed that doing so carries font & formatting information into your blog along with the text.

This can cause unexpected formatting problems, especially when inserting the “More” tag, changing themes, or when your content is reproduced in RSS readers or elsewhere.

The best way to avoid this is to copy & paste your post in as plain text. In the “Edit” and “Add New” screens for both posts and pages, make sure you have Visual mode selected. In Visual mode you will see a row of icons for formatting your text. The farthest icon to the right is called “the kitchen sink”. Click that icon and a second row of icons appears. One of them is a clipboard with the letter T on it. That is the one for posting as plain text. That’s the one to use. To the right of that icon is a clipboard with a W on it. That one is for pasting from MS Word. It removes most of the Microsoft code but not all of it, and therefore I don’t recommend it.

If you need more text formatting options than your two rows of icons offer, download the TinyMCE Advanced plugin, which will give you icons for creating tables and other advanced formatting features.

So, you have a bunch of posts with all sorts of formatting code in them from Microsoft. How do you get rid of the “junk code”? Just highlight the entire post, and use the icon to the right of the “paste from Word” icon. It looks like a white eraser and if you hover your mouse over it, you’ll see that it says “Remove formatting”. Works like a charm! Switch from Visual to HTML mode and you’ll see that all the Microsoft code is gone.

If you generally don’t like the way a font displays within your theme, adjust it in the stylesheet, not within the post or page.

Keep it clean and simple!

This article copyright © John Nasta 2009 – All Rights Reserved
Share This!
  • Add to favorites
  • Print
  • Twitter
  • Facebook
  • LinkedIn
  • MySpace
  • Google Bookmarks
  • Digg
  • Yahoo! Buzz
  • Technorati
  • MSN Reporter
  • Live
  • del.icio.us
  • StumbleUpon
  • DZone
  • LinkArena
  • Fark
  • Blogosphere News
  • Propeller
  • Blogplay
  • Mixx
  • Sphinn
  • Reddit

Related posts:

  1. WordPress – the “More” tag A few clients have asked me how to make only a short version of a...
  2. Advanced Customizing of Atahualpa WordPress Theme Atahualpa from Bytes For All just might be the most impressive free WordPress theme available...
  3. SEO – Avoiding Duplicates with Canonical URL Tags You may have seen my article about the Ultimate Noindex Nofollow tool for WordPress, but...

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>