Copying and Pasting from Word
Sanitizing Text When Working on Websites
Dealing with the challenges of copying and pasting from Microsoft Word is a common issue when using different content management systems (CMS) like WordPress or Joomla. This guide aims to tackle this problem and offer simple solutions to prevent it from happening.
Sanitize Formatted Text Before Pasting
When you copy content (text, tables, images, etc.) from another program, such as Microsoft Word, and paste it into a browser-based editor, additional formatting information embedded by Word may accompany it. This extra formatting data can occasionally cause unexpected issues in the editor due to differences between the two programs. Word’s formatting is not always compatible with pure (or optimal) HTML, potentially resulting in complications.
Copying and pasting from Word works best when you sanitize the text, removing that extra formatting. Here are two ways to do that:
- To minimize formatting issues when transferring content from Microsoft Word to a web browser editor, consider an intermediate step. After copying from Word, paste the content into a plain text document using programs like Notepad on Windows or TextEdit/TextWrangler on Mac. Once pasted into the plain text document, select all the text, copy it again, and then proceed to paste it into the desired web browser editor. While you may need to reapply certain formatting elements like bold or italic in the web browser editor, this method helps ensure a cleaner transfer of text without the interference of additional formatting information from Microsoft Word.
- An alternative method to ensure clean text when copying from Microsoft Word to a web browser editor is to paste the content directly into the editor. After pasting, select the recently pasted text and look for the “Remove Formatting” button, if available. Alternatively, some editors may provide a “Paste from Word” option specifically designed to handle Word-formatted content. Utilizing either of these options should help eliminate any extra formatting, resulting in a cleaner representation of the text in the web browser editor.
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.