docx
    Preparing search index...

    Class ConcreteNumbering

    Represents a concrete numbering instance in a WordprocessingML document.

    A concrete numbering instance references an abstract numbering definition and can override specific levels. Paragraphs reference concrete numbering instances to apply list formatting.

    Reference: http://officeopenxml.com/WPnumbering.php

    <xsd:complexType name="CT_Num">
    <xsd:sequence>
    <xsd:element name="abstractNumId" type="CT_DecimalNumber" minOccurs="1"/>
    <xsd:element name="lvlOverride" type="CT_NumLvl" minOccurs="0" maxOccurs="9"/>
    </xsd:sequence>
    <xsd:attribute name="numId" type="ST_DecimalNumber" use="required"/>
    </xsd:complexType>
    // Create a concrete numbering instance
    const concreteNumbering = new ConcreteNumbering({
    numId: 1,
    abstractNumId: 0,
    reference: "my-numbering",
    instance: 0,
    overrideLevels: [
    {
    num: 0,
    start: 5, // Start numbering at 5 instead of 1
    },
    ],
    });

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    instance: number

    The instance number for tracking multiple uses.

    numId: number

    The unique identifier for this numbering instance.

    reference: string

    The reference name for this numbering instance.

    Methods

    • Prepares this component and its children for XML serialization.

      This method is called by the Formatter to convert the component tree into an object structure compatible with the xml library (https://www.npmjs.com/package/xml). It recursively processes all children and handles special cases like attribute-only elements and empty elements.

      The method can be overridden by subclasses to customize XML representation or execute side effects during serialization (e.g., creating relationships).

      Parameters

      • context: IContext

        The serialization context containing document state

      Returns IXmlableObject | undefined

      The XML-serializable object, or undefined to exclude from output

      // Override to add custom serialization logic
      prepForXml(context: IContext): IXmlableObject | undefined {
      // Custom logic here
      return super.prepForXml(context);
      }