Do you like writing in Microsoft Word instead of WordPress? Want to import the .docx document in WordPress instead of copying/pasting which usually messes up the formatting? In this article, we will show you how to import .docx documents in WordPress.
Why and When You Need to Properly Import .docx Files in WordPress?
Some users prefer to write their articles in Microsoft Word, which comes with a built-in spell check, thesaurus, templates, styles and formatting. The default WordPress visual editor does not offer all these features.
Another possible usage scenario is guest blogging. If you do not want to give guest authors access to your WordPress admin area, then they often send their guest posts either in plain HTML or a .docx document.
Lastly, you may already have some content saved in .docx documents. Copying and pasting from docx can be difficult, especially if you have to copy content from multiple documents.
Having said that, let’s see how you can properly import .docx documents in WordPress without breaking formatting.
Importing .docx Documents in WordPress
The first thing you need to do is install and activate the Mammoth .docx converter plugin.
Upon activation, you need to create a new post or edit an existing one. On the post edit screen, you will find the Mammoth .docx converter meta box below the post editor.
Simply click on the choose file button to select a .docx file from your computer.
As soon as you select the .docx file, the plugin will show you three views of the documents. In the Visual tab, you will see how the document will look in WordPress.
You will notice that it will ignore any styles applied to your .docx documents such as text color, background color, padding, margin, etc. Instead, it will let your theme’s stylesheet control how to display those things.
You can also view the HTML generated by the converter by clicking on the Raw HTML button. You can click on the messages button to see if there were any warnings or errors during conversion.
If you are satisfied with how the document looks in the visual tab, then you can click on the ‘Insert into editor’ button. The plugin will insert converted HTML into your WordPress post editor.
You can continue to work on the post. If you are new to WordPress,
Mammoth .docx converter plugin converts a .docx file into a clean HTML format compatible with WordPress. Currently, the plugin supports the following features:
- Headings like Heading 1, Heading 2, are converted into h1,h2, etc.
- Lists
- Tables are imported without formattings like border and cell colors
- Plain HTML formattings like bold, italic, superscript, and subscript
- Images embedded in the document are imported into WordPress
- Links
- Textboxes are converted into plain paragraphs
The plugin does not make any changes to your original .docx document, it does not even store it on your WordPress site.
We hope this article helped you import .docx documents in WordPress.