Skip to content

DOCX Export: list items of different list types are not part of the same numbering instance #2227

Closed

Description

@StephanMeijer

Very related to #2225 and #2226

Exported material

bn-lists.docx

BlockNoteLibreOfficeGoogle Docs
Lists that are exported Image Image

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)

word-numbering.xml
word-document.xml
gd.docx

Activity

  1. changed the title [-]Docx Export:[/-] [+]DOCX Export: list items of different list types are not part of the same list[/+] on Dec 3, 2025
  2. changed the title [-]DOCX Export: list items of different list types are not part of the same list[/-] [+]DOCX Export: list items of different list types are not part of the same numbering instance[/+] on Dec 3, 2025
  3. added
    needs-triage
    on Feb 5, 2026
  4. added
    bug:P4
    and removed
    needs-triage
    on Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug:P4

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions