Publish Helper logo

WordPress 的乾淨 HTML

WordPress 是全球最受歡迎的 CMS,為超過 40% 的網站提供支援。當您從 Google Docs 或 Word 貼上到 WordPress 的視覺化編輯器時,inline styles 和專有 class 會一起帶入,導致格式問題。使用 Publish Helper 在貼到 WordPress 之前清理您的 HTML。

IWordPress 的 HTML 問題

WordPress 的 Gutenberg 編輯器在貼上時會移除部分inline styles,但保留其他樣式的方式不一致。區塊編輯器的段落可能會繼承 Google Docs 的 font-family 和 font-size 宣告,覆蓋您的佈景主題樣式。傳統編輯器更不寬容 — 它幾乎會保留所有貼上的 inline styles。

II如何將乾淨的 HTML 貼到 WordPress
  1. 1.

    從 Google Docs、Word 或任何編輯器複製您的內容

  2. 2.

    貼到 Publish Helper 中並點擊「清理 HTML」

  3. 3.

    在 WordPress 中,新增自訂 HTML 區塊或切換到程式碼編輯器

  4. 4.

    從 Publish Helper 貼上乾淨的 HTML 輸出

  5. 5.

    預覽您的文章以確認格式與佈景主題一致

IIIWordPress 使用技巧
IV常見問題

為什麼我的 Google Docs 貼上內容在 WordPress 中看起來不同?

+

Google Docs 的 inline styles(font-size、font-family、color)會覆蓋您的 WordPress 佈景主題樣式。先用 Publish Helper 清理 HTML,以移除這些inline styles,讓您的佈景主題字型排版正確套用。

應該使用視覺化編輯器還是程式碼編輯器?

+

對於來自 Publish Helper 的乾淨 HTML,請使用自訂 HTML 區塊或程式碼編輯器。視覺化編輯器可能會重新引入您剛移除的格式。

這適用於 WordPress.com 嗎?

+

是的。WordPress.com 支援自訂 HTML 區塊,就像自架的 WordPress 一樣。工作流程完全相同:在 Publish Helper 中清理,貼到自訂 HTML 區塊中。

Related Tools & Guides

Ready to clean your HTML?

Open Publish Helper

Last updated: March 2026

更新日誌

v2.2.02026-03-18
  • 新功能AI-Powered Title to SEO Slug — Convert blog titles in any language to SEO-friendly English slugs in under 10 seconds
  • 新功能Slug generator toggle on the main page — generate slugs right after editing, above the fold
  • 新功能Table support — pasted tables from Google Docs now render correctly
  • 新功能Remove <br> after headings cleanup option (on by default)
  • 新功能Partial text selection copy in the HTML code view
  • 新功能Sticky Clean HTML button at the bottom of the page
  • 改進Heading conversion now strips prefixes from existing heading tags and supports Chinese full-width colon (:)
  • 改進Shared footer across all pages
v2.1.22026-03-17
  • 修復Bug fixes and improvements
v2.1.12026-03-16
  • 修復Bug fixes and improvements
v2.1.02026-03-16
  • 新功能Formatted/Raw toggle for the HTML code view
  • 改進Copying from the code panel now always gives clean, unformatted HTML
v2.0.02026-03-16
  • 新功能Welcome to Publish Helper — free online tools for content editors
  • 改進Improved search engine visibility
v1.1.02026-03-16
  • 改進Clipboard copy — clean HTML output matches the code view
v1.0.02026-03-16
  • 新功能Rich text editor with Google Docs paste support
  • 新功能HTML cleanup: strip styles, classes, empty tags, and Google Docs artifacts
  • 新功能Heading conversion from text prefixes to proper HTML tags
  • 新功能Find & replace with regex support and saveable presets
  • 新功能Syntax-highlighted HTML preview with one-click copy