[Beta]: DOCX import drops underline, text color, background color, alignment, sub/superscript and blockquotes without a warning, even from Plate's own export
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react, typescript
調査の方向性
Start with packages/platejs/src/docx/import/lib/importDocx.ts around lines 1474–1477 to inspect the Mammoth conversion options, then read apps/www/src/registry/components/editor/import-toolbar-button.tsx around lines 34–46 for warning display. Reproduce the DOCX round trip on /docs/docx and check which formats survive import. Done means supported formats return on import, and unsupported ones are identified in the warnings.
索引モデルが issue の本文から書いたものです。
説明
Testing lane
- Repository:
udecode/plate - Branch:
next - Release channel: Beta
- Exact commit/package version:
NOT_ENOUGH_INFO
Summary
In the DOCX demo on /docs/docx, Import from Word keeps headings, bold, italic, strikethrough, lists, tables and links. It drops underline, text color, background color, superscript, subscript, paragraph alignment and blockquotes. A file that the same demo has just exported with underline, color, background and centering comes back without any of them, and no warning shows. For a Word file with these formats the only feedback was the toast Imported with 4 warnings., which does not say what was lost.
Reproduction
The demo on /docs/docx has Import and Export buttons in its toolbar. Import opens a menu with Import from Word, and Export one with Export as Word.
Repro 1: round trip on /docs/docx, Chromium
An agent ran this on 2026-10-21 (PT) in the Claude desktop app's built-in Chromium, at natamox's request.
- Open https://beta.platejs.org/docs/docx.
- In the demo editor, select a word. With the toolbar, underline it, give it a text color and a background color, and center its paragraph.
- Click
Export, thenExport as Word. The demo savesdocument.docx. - Click
Import, thenImport from Word, and pick thatdocument.docx.
The agent checked the exported file: its word/document.xml holds w:u, w:color, w:shd and w:jc for these formats. After step 4 the word has no underline, color or background, and the paragraph is no longer centered. No warning shows.
Repro 2: a Word file with these formats, Chromium
Same agent, browser and date. The agent imported a Chinese report in Word format that it had made for the test. The report has underline, red text, yellow shading, superscript, subscript, a centered paragraph, a right-aligned paragraph and a blockquote.
Headings, bold, italic, strikethrough, lists, the table and links came in. Underline, text color, shading, superscript, subscript, center and right alignment, and the blockquote were all lost. The only toast was Imported with 4 warnings. The file is not attached, since GitHub issues do not take .docx files.
natamox retested /docs/docx by hand on 2026-10-23 (PT): imported files still lost underline, color, shading, alignment and other formats.
Expected
- The Format support table on /docs/docx says that "Paragraphs, headings, supported marks and properties" "Decode through the installed HTML mappings and export through the configured static renderer". In this demo, underline, text color, background color and alignment are supported: the editor applies them, and Repro 1 shows the demo's export writing them into the Word file.
- So a file the demo exports should import back with the same formats. Where a format cannot come back, the import should report it, as the docs say it does for other content it omits. This is the expectation in the agent's notes.
- The warnings toast should say what was dropped, not only how many warnings there were.
Actual
These formats disappear on import. Plate's own export loses them on the way back with no warning. For an outside file, the toast gives only a count.
Environment
- Exact
nextcommit/Beta package version:NOT_ENOUGH_INFO. The page does not show its build. The agent read the source atnext87b29efbfaon the day of the first run. - First run: an agent in the Claude desktop app's built-in Chromium 152.0.7977.167, desktop viewport 1024×768, on 2026-10-21 (PT). A script put each file into the page's file input. The agent read the exported file with a script and LibreOffice in headless mode; it did not open Word.
- natamox's hand retest on 2026-10-23 (PT). The browser is not recorded.
- Not replayed on the live Beta after 2026-10-23. The code below reads the same on
nextfc9ebcd16b.
Caveat
From a reading of the code on next fc9ebcd16b, not checked with a debugger:
packages/platejs/src/docx/import/lib/importDocx.ts:1474-1477converts the file to HTML with mammoth, passingstyleMap: ['comment-reference => sup']and nothing else.- Inference: mammoth's default conversion leaves out underline, font color, highlight and alignment, so these formats are gone before Plate's HTML mappings see them, and no diagnostic can record them. This comes from mammoth's documented defaults and was not traced for each format. Why superscript, subscript and blockquotes are lost was not traced.
- The demo's toast counts the warnings and shows only the count (
apps/www/src/registry/components/editor/import-toolbar-button.tsx:34-46).
Evidence
- No recording. The original run recorded no video of these imports. The toast text and the XML element names are copied from the agent's notes.
Related
- #5284: The DOCX demo's Import from Word rejects any file with an image, a footnote, a header, a text box or a partial comment.
- 主要言語
- TypeScript
- スター
- 16.6k
- フォーク
- 993
- 平均マージ
- 20時間 21分
- マージ済み PR(30日)
- 60
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
udecode/plate のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
[Beta]: After Enter saves an edited link URL, the link toolbar stays hidden while the caret is in the link対応中かも @zbeyens が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
udecode/plate#5314 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[Beta]: The docs Demo example page starts with an empty editor対応中かも @natamox が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
udecode/plate#5308 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
Parallel reticle_verify opens per-flow leases without the source lease's ignoreHTTPSErrors対応中かも @as992949791 が今日担当しました。 オープンgood first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
reticlehq/reticle#2033 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area:quality p3-medium ready-for-agent type:docs
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
fderuiter/deruiter.dev#3589 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
manfredsteyer/angular-oauth2-oidc#1514 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
marmelab/react-admin#11431 ·
メンテナーはふだん 1 日以内に返信