One thing that you quickly learn when maintaining your own WordPress blog or website is that you can’t copy and paste content directly from Microsoft Word documents without any problems. When you do, for example, you’ll find one of two things:
When you cut and paste, MS Word tries to preserve the style information contained in the original document. And this style information causes problems because it (1) does not match the styles for the rest of your website and (2) it often contains information that interferes with how Internet Explorer should display the web page.
Fortunately, this problem has been well-documented and there are a few easy fixes.
All recent versions of WordPress (and its TinyMCE WYSIWYG editor) have a little button in the editing panel which enables you to remove the excess formatting. See the image below:
If you are using Dean’s FCKEditor plugin, see the image below:
You will also notice another button on the left of the Paste From Word button which enables you to Paste as Plain Text. This is another equally useful option for removing formatting.
There are several offline blog and text editors which can serve as a great replacement for MS Word. Some include Windows Live Writer, Blogo, WordPad, and Notepad. These simpler editors are great because they add no additional formatting of their own.
If you are the sole editor of your blog, it is easy enough for you to use the solutions above. But if there are multiple authors on your blog, or if you’ve created a blog for a client, you’ll inevitably run into this problem over and over again. So what can you do to FORCE all users to copy and paste using the above method? Not much…
But there is a super useful plugin by Dave at This Much I Know, which basically stops users from pasting content directly and instead presents them with a paste window. For advanced users, this plugin is highly customizable by editing the source code directly and changing some of the TinyMCE initialization settings.
If you know of any other similar plugins or filters that remove MS Word formatting, please leave a comment.
Tags: content, FCKEditor, internet explorer, TinyMCE, WordPress, wysiwygTrackback URL for this entry:
http://www.velvetblues.com/web-development-blog/wordpress-problems-pasted-ms-word-content/trackback/
Contact us today for a quote. Click here to submit details regarding your project.
If you are making a general inquiry, send an email to info@velvetblues.com
Normally if i have to copy or quote a part of a text i paste it in notepad, remove word wrap and then recopy to paste in wordpress.
Weirdly Ihave the habit to do my drafts on notepad
There are piece of notepad drafts all over my document folder lol. Then I just copy a post to wp when i have to publish and format accordingly with photos and h1 or h2 tags.
Kurt Avish’s last blog post..Google Page Rank Update April 2009
Well i will have to agree with Kurt. The best way i do my pasting is pasting to notepad and then copy/pasting from there. Just because notepad removes all formating and plain text is what is left. Nice post there!
stratosg’s last blog post..Member Of The Month: March
I always ‘Save As’ from word and choose ‘Web Page, Filtered’ as the type. This removes most of the Word specific information. Although that’s probably a similar result as the paste from word option.
Oh yea this is an oldie but a goodie. I’ve been warning for years to not cut from MS for anywhere…way too much crap-code is input.
I use notepad as well, but may try some others you mentioned.
Dennis Edell’s last blog post..Opening INTERNAL Links- New Window or Same Window?
If I am using MS Word for editing, I usually copy paste it once to notepad and again copy paste on to the WP editor. I hate MS Word’s quote characters which are many and sometimes URLs can get screwed up because of this.
Ajith Edassery’s last blog post..Blogs could transform into SocNets
Yeah just like Dennis said, I use notepad for most simple writing, copy and pasting.
Ben Pei’s last blog post..MIKEY Worm Hits Twitter!
I don’t use Word at all - don’t even have Office installed. I use Notepad++ and highly recommend the program to Windows users.
But I do run into this problem with clients. I can usually teach them to use the paste from Word button. The plugin also sounds like it could be useful with certain clients.
Funny that IE has the most trouble rendering Word
Kim Woodbridge’s last blog post..5 Most Popular (Anti) Social Articles Written This Year
By the way, is that MS 07?
Ben Pei’s last blog post..10 Cruel Facts About Working In An Office Cubicle
Great article. I come across a lot of bad code that comes from copy and pasting directing from Word into a WYSIWYG editor. Google tends to associate this bad code with spam as people who rapidly build website for the purpose of spamming, tend to copy and paste from word and produces this bad code. To the commenter above me, this relates to all version of Word.
I’ve always done the whole “paste into and copy from notepad” approach, but that always removes formatting. Dreamweaver does a decent job of cleaning up.
Renowned Media´s last blog ..How to change wordpress tag cloud font sizes
The best way i do my pasting is pasting to notepad and then copy/pasting from there. Just because notepad removes all formating and plain text is what is left.
Freelance Web Designer´s last blog ..Free Wordpress Template: Sang Saka