Publish Helper logo

將 LibreOffice Writer 轉換為乾淨 HTML

LibreOffice Writer 貼上的 HTML 包含 P 和 T 前綴的 CSS class 名稱、帶有公制單位的 inline styles 和舊式格式屬性。Publish Helper 可移除 LibreOffice 的殘留標記,產生符合標準的 HTML 輸出。

I為什麼 LibreOffice Writer 的 HTML 這麼亂

LibreOffice 產生的 HTML 帶有自動生成的 class 名稱(P1、P2、T1、T2)、包含這些 class 的嵌入式 <style> 區塊、使用公分為單位的 inline styles,以及表格元素上的舊式 HTML 屬性如 align 和 valign。

II清理前後對比

LibreOffice Writer 輸出

<p class="P1"><span class="T1">Introduction</span></p>
<p class="P2"><span class="T2">This is a paragraph with </span><span class="T3">bold text</span><span class="T2"> and </span><span class="T4">italic text</span><span class="T2">.</span></p>

乾淨的 HTML

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

1.從 LibreOffice Writer 複製您的內容

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

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

IV常見問題

LibreOffice 的貼上效果比 Word 好嗎?

+

LibreOffice 的貼上通常比 Word 簡單 — 沒有 XML 命名空間或條件註解。但它仍然使用自動生成的 class 名稱和嵌入式樣式區塊,需要清理。Publish Helper 兩者都能處理。

Publish Helper 能移除嵌入式樣式區塊嗎?

+

可以。HTML 清理功能啟用「移除樣式標籤」後,會移除嵌入式 <style> 區塊及其關聯的 class 引用,只留下內聯內容。

可以在 Linux 上使用 Publish Helper 嗎?

+

當然可以。Publish Helper 完全在瀏覽器中運作 — 支援 Linux、macOS、Windows、ChromeOS,以及任何有現代網頁瀏覽器的裝置。

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