Repository navigation
fix(list): keep lists through Word, HTML and Markdown import and export - #5160
Merged
Merged
Conversation
Word export lost bullets, numbered headings and anything but plain paragraphs inside table cells, and Word import refused files whose footnote parts hold only Word's separators. Table cells now convert through the same path as the body, and the registry static kit draws bullets as real lists, so Word and HTML keep them. A listed heading or quote keeps its text, style and number in Word. Import opens files whose notes are only separators or an empty continuation notice, and reads checkbox bullet levels back as to-dos. HTML import reads a list drawn inside its block back onto that block, Markdown export keeps an item's later paragraphs inside it, list-start warns only for a start Word would show differently, and the import button shows one warning summary.
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
| Name | Type |
|---|---|
| platejs | Major |
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Word export's start warning parsed listLevels through its own guard. It now reads a level's start through the writer's toWordLevelRules, so the warning and the Word writer cannot disagree. The Markdown list builder opens a nested list through one openNestedList helper instead of two copies, and the continuation check calls getListIndent. The plan and its decision log record the babysit pass.
…ort plan CI on both pushed heads fails only where next fails at 6fa1169, apart from one heavy test per run that times out on the runner and passes locally well under its limit. The plan and its decision log now say so for the second head.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan: docs/plans/2026-10-12-list-import-export-fixes.md
Why
A browser regression of the list refactor found lists losing their structure or content when a document goes through Word, HTML or Markdown, plus import and export warnings for losses that never happen. Each fix sits in the code that owns the behavior.
What changed
list-startwarns only for a start Word would change, and the import button shows one warning summary.Scope
Where to start
render-document-file.tsandxml-builder.ts(table cells and listed headings),exportDocx.tsx(list warnings) anddocx-document.ts(the Word level reader that the warnings and the writer share).importDocx.tsandreadDocxNumbering.ts.BaseListPlugin.ts,listToMdastTree.tsandconvertNodesSerialize.ts.block-list-static.tsx,list-static.tsxandimport-toolbar-button.tsx.apps/www/public/r/**,apps/www/src/__registry__/**and the registry changelog JSON.Blast Radius
Touches DOCX export and import, HTML list import, Markdown list export and the copied static list kit. Numbered and to-do output stays byte-identical in static HTML and Word; bulleted quotes and code blocks now draw their bullet inside the block, as numbered ones already do.
Verification
platejsandwww; each fix has a test that failed first, and mutation runs revert each fix.nextfails at6fa1169c5e: the same check steps, failing tests and browser cases.