Paste from Word to eliminate HTML hijinks

Microsoft Word is notoriously bad at generating HTML code. A quick search for "ms word html clean up" will return thousands of results of people with the same problem and a few claiming to have solved it.

HTML code generated by Word is inconsistent making it difficult to reliably find (and remove). We have no control over what Word exports and it may vary with the version of Word, the operating system of the end user and even the formatting the original document.

The "Paste from Word" feature in the CMS will try to clean up the "code bloat" from Word. Generally it does a good job at removing the unnecessary elements Word adds to HTML, but it's not perfect.

Please always remember to preview your article and check for any quirkiness.

If you used the "Paste from Word" option and things still look odd, click on the HTML link in the article editor toolbar. The bad code , if any, will be visible at the top of the document and can be easily deleted.

Note that these issues primarily affect users of Internet Explorer, so your results may vary if you are using a different browser. You probably are. Nevetheless, IE is still the default browser for about 50% of the world. And note also that while my examples come from the EContent site, this issue affects all Gutenberg-based sites.

Here's an example of what can happen if you simply use Ctrl-V, or right-click and paste, or click on the plain "paste" icon, instead of using the "Paste from Word" button:

Figure 1 - Article with no text showing:

(Here's what it should look like.)

This is the result of this chunk of code from the top of a Word document, that snuck in during a paste (figure 2):

Figure 3 - Interestingly, not only does this chunk of evil Word code make the public article invisible, it does the same (when using Internet Explorer) for the article in the CMS:

Way to go with that product integration, Microsoft!

Any questions, please contact us at support@infotoday.com, or open a ticket on ITIFix.com.