14-day Cloud trial
Start today. For free.

One editor. 50+ features. Zero constraints. After your trial, retain the advanced features.

Try Professional Plan for FREE
PricingContact Us
Log InGet Started

How to copy-paste from Word to WordPress without formatting issues

April 4th, 2023

6 min read

How to set custom font sizes in TinyMCE

Written by

Joe Robinson


How-to Use TinyMCE

When you’re writing content, you may have a sense of dread, knowing it's going to be copy-pasted somewhere. Why’s that? Because often, in the process of copying and pasting, the content’s formatting starts to break. So you need to spend  time checking and cleaning up the broken formatting. This is especially the case if you’re pasting from MS Word to WordPress.

However with the right rich text editor, like TinyMCE, this doesn’t have to be the case. 

By installing TinyMCE  as your WordPress rich text editor – it opens the door to clean copy-pasting that handles the hidden content (or “inline styles”) that cause the extra cleanup work. With TinyMCE, you can configure the Power Paste Premium plugin, to take charge of the whole process. 

Read the steps below to see how this Premium plugin saves you from copy-paste dread.

Word to WordPress: why does this matter?

It matters because not everyone writes directly into WordPress.

If you’re using WordPress to build your CMS, there’s no guarantee that each and every person will write directly in the WordPress text editor. They might prefer to use MS Word to write, then transfer and store it in the CMS. . 

So installing a plugin that works well in a CMS and automatically cleans up any possible copy-paste formatting issues, is a bonus. And a huge time saver.

Common WordPress formatting issues

These are the main formatting issues that confront writers when they’re attempting to copy and paste their MS Word content into WordPress:

  • Extra spaces appearing in the text editor –  WordPress can attempt to incorporate the MS Word Inline styles, but instead introduces unnecessary or rogue code into the content.

Note: To manually clean your content, you need to switch to WordPress “text editing” mode – by selecting the “text” editing tab at the top of the editor window. This mode lets you change the HTML that’s hidden by the visual editor.

In text mode, you'll see a lot of extra HTML that needs to be removed. If you’ve ever done this before, you know it’s a slow and tedious process. Plus, you need to have a basic knowledge of HTML.

  • Mishandling <code> tags – Another issue is that WordPress notices and acts on <code> tags, but not in a constructive way. Rather than delving into your WordPress theme CSS files and adding style to handle <code> tags, PowerPaste can preserve styles if they’re needed.
  • Removing paragraph tags when switching editor view – While you could switch to “text” editing, switching back to the main editor view causes more formatting issues, because WordPress takes away paragraph tags or other tags deemed unnecessary. Removing HTML tags is a very old WordPress formatting issue, as noted in the WordPress support pages.

Copy and paste from Word to WordPress

To get started using PowerPaste to solve your Word to WordPress issues, there are some pre-requisite:

  • Your Wordpress Account has a premium subscription in order to use plugins
  • A TinyMCE API key to access Premium plugins (PowerPaste for instance)

To get started, set TinyMCE as the editor of choice in WordPress:

Set TinyMCE to work with WordPress 

  1. Log in to your Tiny account

  2. Click API Key Manager

  3. Indicate that you want to accept requests from your WordPress domain.

For example, if your WordPress site is accessed from mysite.com.au, add that domain, then click Update API Key

  1. Log in to your WordPress Dashboard, click Plugins, then Add New

  2. Search for Advanced TinyMCE Configuration plugin, and click Install Now

  3. After the plugin is installed, click Activate

  4. From within your WordPress Dashboard, click Settings, then TinyMCE Config

  5. Scroll down to the Defaults section, and click Show the default settings

  6. On the long list of configuration options, locate external_plugins, and click Change next to the setting. This opens an JSON array that resembles the following when copied into a text editor:

    "visualblocks": "https:\/\/editoradvance.wpcomstaging.com\/wp-content\/plugins\/tinymce-advanced\/mce\/visualblocks\/plugin.min.js",
    "table": "https:\/\/editoradvance.wpcomstaging.com\/wp-content\/plugins\/tinymce-advanced\/mce\/table\/plugin.min.js",
    "wptadv": "https:\/\/editoradvance.wpcomstaging.com\/wp-content\/plugins\/tinymce-advanced\/mce\/wptadv\/plugin.min.js",
    "anchor": "https:\/\/editoradvance.wpcomstaging.com\/wp-content\/plugins\/tinymce-advanced\/mce\/anchor\/plugin.min.js",
    "code": "https:\/\/editoradvance.wpcomstaging.com\/wp-content\/plugins\/tinymce-advanced\/mce\/code\/plugin.min.js",
    "insertdatetime": "https:\/\/editoradvance.wpcomstaging.com\/wp-content\/plugins\/tinymce-advanced\/mce\/insertdatetime\/plugin.min.js",
    "nonbreaking": "https:\/\/editoradvance.wpcomstaging.com\/wp-content\/plugins\/tinymce-advanced\/mce\/nonbreaking\/plugin.min.js",
    "print": "https:\/\/editoradvance.wpcomstaging.com\/wp-content\/plugins\/tinymce-advanced\/mce\/print\/plugin.min.js",
    "searchreplace": "https:\/\/editoradvance.wpcomstaging.com\/wp-content\/plugins\/tinymce-advanced\/mce\/searchreplace\/plugin.min.js",
    "visualchars": "https:\/\/editoradvance.wpcomstaging.com\/wp-content\/plugins\/tinymce-advanced\/mce\/visualchars\/plugin.min.js"
  1. Add PowerPaste as another entry into the array, separated from the last entry with a comma, and save the changes:

"visualchars": "https:\/\/editoradvance.wpcomstaging.com\/wp-content\/plugins\/tinymce-advanced\/mce\/visualchars\/plugin.min.js",

IMPORTANT: On the long list of configuration options under Show the default settings, locate plugins, and click Change next to the setting. On the list of plugins that opens, add powerpaste to the end, and remove the paste plugin, as these two plugins are not designed to work together in the same configuration.

Here's how the plugin list should appear:

  1. Save the changes.

  1. Navigate to the Plugins menu, and click on Installed Plugins. On the Plugins list that appears, confirm that the Classic Editor plugin is available, and activate it.

With these steps complete, you can now configure PowerPaste to manage the copy and paste process into WordPress. 

WordPress text formatting: copy Word text with formatting

To configure PowerPaste to preserve the MS Word formatting:

  1. Scroll down to the Add new option heading, and add the following PowerPaste option powerpaste_word_import

The powerpaste word import option in wordpress configuration

  1. Set the powerpaste_word_import option's value to be "merge". This will automatically preserve the inline styles and formatting as well as the spacing structure.

Setting the power paste word option to merge

Instead of merging, if you’d like to empower customers to individually choose if they want to keep their inline styles and formatting or not, you can instead set the option to “prompt”. This then asks the user if formatting should be kept or cleaned away, before the paste process finishes.

WordPress table formatting: how to copy a Word table to WordPress

For a table, when you have powerpaste_word_import set to “prompt”, you can paste a table built in MS Word, into TinyMCE. For example:

The following table has specific spacing and highlighting:

TinyMCE demo table from Word

It can be pasted into WordPress with the formatting kept intact:

The clean table paste from MSWord into TinyMCE Wordpress

WordPress spacing issues

When you have specific spacing between each element of the MS Word file, PowerPaste can preserve or remove the spacing without causing any issues – such as removing paragraphs when the views change in WordPress. For instance:

This example of text has specific spacing, and even spacing created with the Tab key:

Demo MSWord content with spacing made with enter and tab keys

To account for tab spaces, configure the following option in WordPress:

  1. In the TinyMCE Config settings, navigate to the text entry space under the Add new option tab, and include the paste_tab_spaces option:

Powerpaste tab spaces config set up in Wordpress for TinyMCE

  1. Set the value to “2” and save the change.

  2. Testing out PowerPaste has the following result:

Pasting specifically spaced content into wordpress with TinyMCE

Word to WordPress copy-paste is easier with TinyMCE

When using TinyMCE with PowerPaste, your customers can avoid the dreadful experience of pasting their carefully written and formatted content, and then repairing it in the WordPress editor.

In a sense, it’s like writing directly into the text editor, but with all the benefits that come from using MS Word. Most importantly, your site design won’t get messed up with weird fonts and headings.

If you’re interested in automating the Word to WordPress copy-paste problem, check out the TinyMCE PowerPaste for WordPress docs for more information. You can even contact us to find out more about how PowerPaste can better support your writing, copying, and pasting.

Hat Tip: Without Robert Collins’ work, this article would not have been possible. Kudos!

byJoe Robinson

Technical and creative writer, editor, and a TinyMCE advocate. An enthusiast for teamwork, open source software projects, and baking. Can often be found puzzling over obscure history, cryptic words, and lucid writing.

Related Articles

  • How-to Use TinyMCESep 21st, 2023

    How to create fillable documents with TinyMCE

Join 100,000+ developers who get regular tips & updates from the Tiny team.