Skip to content

Instantly share code, notes, and snippets.

@josepedrodiaz
Created May 14, 2025 19:51
Show Gist options
  • Save josepedrodiaz/f9c7ae44a32a3d160a8c94df53a94f9d to your computer and use it in GitHub Desktop.
Save josepedrodiaz/f9c7ae44a32a3d160a8c94df53a94f9d to your computer and use it in GitHub Desktop.

🧹 Why and How to Clean Text When Pasting from Word to WordPress

Why Clean the Text?

When you copy content from Microsoft Word or similar word processors and paste it directly into the WordPress WYSIWYG editor, hidden formatting and HTML code can be carried over. This can lead to:

  • Inconsistent styling on your website
  • Unwanted fonts, colors, and sizes
  • Extra HTML tags that complicate your site's code

How to Clean the Text

  • Use a Plain Text Editor: Before pasting into WordPress, paste your content into a plain text editor like Notepad (Windows) or TextEdit (Mac) to strip away any formatting. Then, copy it from there and paste it into WordPress.

  • Use the 'Paste as Text' Option: Some versions of the WordPress editor have a 'Paste as Text' option, which automatically removes formatting.

  • Use Online Tools: There are online tools available that can clean your text by removing unwanted HTML tags and formatting.

By cleaning your text before pasting, you ensure that your website maintains a consistent and professional appearance.

📺 How To Paste Text Without Formatting In WordPress (YouTube)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment