Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Pasting from Word... WordPress

Hi Guys

I have a Word document which i have tried to paste into Wordpress using the paste from Word icon.

(** update** download doc here:

usually this cleans up the text and the layout is fine. But with this particular text it does not clean up like it should

Can you take a look and explain whey this one is different.

The text was originally lifted from a web page (my client tells me)

Any insights, guidance or thoughts would be interesting to hear.

Many thanks

Answers (5)


Sabby Sam answers:

try to paste that code in the notepad and the paste that code on wp editor.
It must work.


Luis Abarca answers:

There no file attachment, but i always used to copy-n-paste to WordPad or another text editor.

could you upload the file ?

Luis Abarca comments:

You should paste in the HTML mode, the word has HTML content


Dbranes answers:

when I paste the document (opened in Word 2003) into WP (via the Word filter) I get very large lines in the preview, fx:

The revered Ganga river dolphin will soon disappear from India‚Äôs longest river. Joydeep Gupta calls for urgent action against the perils of pollution and dwindling water flow and dangerous fishing techniques.

where   is used for space.

Pasting the code first into fx. the "Notepad" editor should clean all the format.


Abdelhadi Touil answers:

For me I always remove formatting from document using word, then copy-paste to wordpress without any problem (paste directly to wordpress without using the word icon). here is how to remove formatting from a word document:
[[LINK href=""]][[/LINK]]
Or sometimes I just copy from word and paste to notepad, then copy from notepad to Wordpress, but I prefer the first way because it maintains the basic formatting: paragraphes and unordored lists etc...
Good luck.


Francisco Javier Carazo Gil answers:

You can delete HTML tags from Word with this code:

function cleanWordHTML($html) {
$html = ereg_replace("<(/)?(font|span|del|ins)[^>]*>","",$html);

$html = ereg_replace("<([^>]*)(class|lang|style|size|face)=("[^"]*"|'[^']*'|[^>]+)([^>]*)>","<\1>",$html);
$html = ereg_replace("<([^>]*)(class|lang|style|size|face)=("[^"]*"|'[^']*'|[^>]+)([^>]*)>","<\1>",$html);

return $html