WordPress runs 43% of the web, and its Gutenberg block editor is where pasted document HTML goes wrong. A Custom HTML block keeps your markup as written, while a paragraph block re-interprets it as block attributes — and a Docs paste arrives with font-size and class attributes already attached. This page covers what Gutenberg and wp_kses_post() do to a paste, and the one workflow that survives both.
WordPress's Gutenberg editor strips some inline styles on paste but retains others inconsistently. Block editor paragraphs may inherit font-family and font-size declarations from Google Docs, overriding your theme styles. The Classic Editor is even less forgiving — it preserves nearly all pasted inline styles.
Editor:Gutenberg block editor (and the Classic Editor on older installs)
Gutenberg turns the HTML into block attributes. A Docs <p style="font-size:11pt"> arrives as a paragraph that still carries that font size, and a <span> with italic style survives as an inline span rather than an <em>.
The block stores your markup as one HTML string and prints it unchanged. Nothing is re-parsed, so block-validation warnings and re-added styles do not happen here.
wp_kses_post() filters the saved content. Standard tags and style attributes survive, but <style> blocks, <script>, <iframe> and event handlers are removed — so a custom font declaration cannot travel with the paste.
The old TinyMCE editor keeps MsoNormal classes, mso- properties and inline fonts almost intact, because it has no block model to normalise them into.
Write the draft anywhere, then select and copy the passage you want to publish
Paste it into Publish Helper, enable Remove inline styles and Remove classes, and click Clean HTML
In the WordPress editor, add a Custom HTML block (or open Code Editor from the three-dot menu)
Paste the cleaned markup into that block and switch back to the visual editor
Preview the post on mobile as well — block-level tables and long lists are where theme overrides fail
An inline font-family or font-size on the paragraph out-ranks your theme's class rule. Strip the styles in Publish Helper, then paste into a Custom HTML block instead of a Paragraph block.
The editor compared the block's saved HTML with what it expected and the pasted markup did not match. Choose “Convert to HTML” or paste into a Custom HTML block, which never runs block validation.
Google Docs leaves empty <p> elements and trailing <br> tags behind. Turn on Remove spacer paragraphs and Remove empty tags before copying the output.
Gutenberg is a block editor, not a rich-text field, and that is the real source of most WordPress paste problems. Every block keeps its own copy of the HTML plus a set of attributes (alignment, font size preset, colour) derived when the block was created. When the paste does not match the block's expectations, WordPress either silently converts it into a “Classic” block — which then holds the Docs markup almost verbatim, inline styles and c1/c3 classes included — or raises a validation warning. The reliable route is a Custom HTML block: it is a deliberate escape hatch that stores the string you give it.
The second half of the problem is wp_kses_post(), the filter WordPress runs on post content at save time. It allows a wide list of tags common to blog posts, keeps style attributes on many of them, and removes <style> blocks, scripts, iframes and inline event handlers. In practice that means Google Docs typography often survives the save, while a <style> block that tried to define a heading font does not. Cleaning before the paste sidesteps both halves: nothing left to filter, nothing left to override the theme.
Yes. The Custom HTML block is part of Gutenberg core, so WordPress.com and self-hosted installs both accept it. On WordPress.com the block is also the only place where some tags, such as tables, are preserved exactly as pasted.
Tables are usually saved as a Classic block. A table with width attributes copied from Word overflows a narrow theme column on small screens. Strip the width attributes and cell styles in Publish Helper, and let the theme's table CSS handle sizing.
Google Docs inline styles (font-size, font-family, color) override your WordPress theme styles. Clean the HTML with Publish Helper first to remove these inline styles so your theme typography applies correctly.
For clean HTML from Publish Helper, use a Custom HTML block or the Code Editor. The Visual Editor may re-introduce formatting you just removed.
Yes. WordPress.com supports Custom HTML blocks just like self-hosted WordPress. The workflow is identical: clean in Publish Helper, paste into a Custom HTML block.
Ready to clean your HTML?
Open Publish HelperLast updated: March 2026