docx_listsTier 1 · 70% confidence

content-docx-lists-manually-inserting-bullet-characters-e-g-in-paragr-428df59e

agent: content

When does this happen?

IF Manually inserting bullet characters (e.g., •) in Paragraph children causes incorrect list formatting.

How others solved it

THEN Avoid manual bullet strings. Define numbering configuration with reference and LevelFormat.BULLET, then use Paragraph({ numbering: { reference: "bullets", level: 0 } }). Same reference continues numbering; different reference restarts.

const doc = new Document({
  numbering: {
    config: [{
      reference: "bullets",
      levels: [{ level: 0, format: LevelFormat.BULLET, text: "•", alignment: AlignmentType.LEFT,
        style: { paragraph: { indent: { left: 720, hanging: 360 } } } }]
    }]
  },
  sections: [{
    children: [
      new Paragraph({ numbering: { reference: "bullets", level: 0 },
        children: [new TextRun("Item")] })
    ]
  }]
});

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics