Publish Helper logo

將 Rich Text Editors 轉換為乾淨 HTML

電子郵件客戶端、CMS 編輯器和其他富文本工具各有其獨特的混亂 HTML 風格。Outlook 添加 mso- 屬性,Gmail 添加 div wrapper,CMS 編輯器可能注入短代碼或專有標籤。Publish Helper 可將所有這些正規化為乾淨、可攜式的 HTML。

I為什麼 Rich Text Editors 的 HTML 這麼亂

每個富文本編輯器都有自己的 HTML 產生特性。像 Outlook 這樣的電子郵件客戶端嵌入 mso- 屬性和條件註解。Gmail 將內容包裝在深層嵌套的 div 中。CMS 編輯器可能注入短代碼、自訂屬性或外掛特定的標記。共同點是非 semantic、不可攜式的 HTML,在移到不同平台時會出問題。

II清理前後對比

Rich Text Editors 輸出

<div dir="ltr"><div style="font-size:small"><div><b style="font-size:14px">Introduction</b></div><div style="font-size:small"><br></div><div style="font-size:small">This is a paragraph with <b>bold text</b> and <i>italic text</i>.</div></div></div>

乾淨的 HTML

<h2>Introduction</h2>
<p>This is a paragraph with <strong>bold text</strong> and <em>italic text</em>.</p>
III如何清理 Rich Text Editors 的 HTML

1.從 Rich Text Editors 複製您的內容

2.貼到 Publish Helper 中並設定清理選項

3.點擊清理 HTML 並複製結果

IV常見問題

可以清理從電子郵件貼上的 HTML 嗎?

+

可以。將 Gmail、Outlook、Apple Mail 或任何電子郵件客戶端的內容貼到 Publish Helper 中。清理流程會移除電子郵件特定的 wrapper、inline styles 和條件註解。

從其他 CMS 貼上的內容呢?

+

Publish Helper 適用於來自任何來源的內容。如果您要從一個 CMS 遷移內容到另一個,將 HTML 貼到編輯器中並清理,即可移除平台特定的標記,然後再匯入到新系統中。

Publish Helper 能處理混合來源的內容嗎?

+

可以。如果您的文件包含來自多個來源的貼上內容(例如,帶有電子郵件摘錄的 Google Docs 草稿),Publish Helper 會統一處理所有 HTML,不論來源為何,均移除所有非 semantic 標記。

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