Fix Broken “Copy Paste” Content in WordPress
Nov 26, 2014
Several times a day, I pull content out of a Open Office or an email and put it on WordPress with copy and paste. And even though the content looks okay in the editor, when I publish and view my post, something is wrong. For example:
The solution is easy! The problem is, when you copy and paste formatted text into WordPress, your computer attempts to bring the styles of the source with the text. That means, the font, font size, bolding, italics, spacing, and many other characteristics can be pasted in with the text.
Worse – you can’t see the styles by default because they’re transferred as HTML tags. Here’s how to determine if this is the problem you’re experiencing – click the tab that says “Text” on the top right of your WordPress editor.
If you’re just writing text, and you haven’t tried to include headers or make other style choices, you should see some pretty clean code.
Note – the clean code example includes some HTML – the <h2> </h2> opens and closes the header style that I wanted to add to the content.
Now, when you paste in your text, WordPress will remove any HTML from the text.