TypeCellOS / TypeCellOS/BlockNote
DOCX Export: list items of different list types are not part of the same numbering instance
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.2k
- Forks
- 772
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 17
Description
Very related to #2225 and #2226
Exported material
| BlockNote | LibreOffice | Google Docs |
|---|---|---|
|
|
|
|
Unconventionalness
For the same reason as described in #2225, the numId differs between different list type (ordered/unordered), even when it is a subitem under the same list.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document ...>
<w:body>
<!-- ... -->
<w:p>
<w:pPr>
<w:pStyle w:val="ListParagraph"/>
<w:numPr>
<w:ilvl w:val="0"/>
<w:numId w:val="3"/>
</w:numPr>
</w:pPr>
<w:r>
<w:t xml:space="preserve">List 3 item 3 (unordered)</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:pStyle w:val="ListParagraph"/>
<w:numPr>
<w:ilvl w:val="1"/>
<w:numId w:val="2"/>
</w:numPr>
</w:pPr>
<w:r>
<w:t xml:space="preserve">List 3 item 3 subitem 1 (ordered)</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:pStyle w:val="ListParagraph"/>
<w:numPr>
<w:ilvl w:val="1"/>
<w:numId w:val="2"/>
</w:numPr>
</w:pPr>
<w:r>
<w:t xml:space="preserve">List 3 item 3 subitem 2 (ordered)</w:t>
</w:r>
</w:p>
<!--- ... -->
</w:body>
</w:document>
This is unwanted behavior. This explicitly defines the subitems to be a different numbering instance than it's 'parent'.
Conventional method
Define in word/numberings.xml if level 2 needs to be a ordered/numeric or unorderd/bullet. Give every list a different numId as described in #2225 (you can reuse the abstract numberings). This method is compatible with ECMA-376 and with all major editors. To do this properly, word/numberings.xml must be calculated, not be a fixed and static file injected.
Example
(from Google Docs)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the exported bn-lists.docx and the provided word/numbering.xml and word/document.xml examples, focusing on how list levels and numId values are represented. Confirm that a mixed ordered/unordered sublist remains in the parent numbering instance while preserving its level-specific formatting. Done means the generated DOCX matches the conventional behavior in major editors; no source file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- content, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100