Copying and Pasting from Word
Sanitizing Text When Working on Websites
Copying and pasting from Microsoft Word is a well known problem using any CMS (WordPress, Joomla, etc.). This issue seems to come up a lot so we’ll explain it here and give you ways to make sure it does not happen.
Sanitize Formatted Text Before Pasting
When you copy anything (text, tables, images, etc.) from another program, such as Microsoft Word, and paste it into a browser editor, additional formatting information embedded by Word comes along. This extra formatting info can sometimes cause unexpected issues in the editor since Word’s formatting isn’t pure (or good) HTML, and the programs are different.
Copying and pasting from Word works best when you sanitize the text, removing that extra formatting. Here are two ways to do that:
- To avoid formatting issues when copying from Word, follow these steps: Copy from Word, open a plain text document (use Notepad on Windows or TextEdit/TextWrangler on Mac), and paste the content there. Select all the text again, copy it once more, and then paste it into the editor in your web browser. You may need to reformat elements like bold and italic, but your text will be clean.
- To handle Word formatting issues, copy from Word, paste into the editor, and then select the pasted content. Look for a “Remove Formatting” button, if available. Alternatively, some editors have a “Paste from Word” option specifically designed for this purpose. Using these features should help clean up your text from any extra formatting.
The first method is probably the best way to do it. WordPress has a good system for pasting from Word and so does Joomla.
If you need to copy and paste tables, then please note that you will have to rebuild the entire table again in HTML. Sorry.