docx
    Preparing search index...

    Class NextAttributeComponent<T>

    Next-generation attribute component with explicit key-value pairs.

    NextAttributeComponent provides an alternative approach to attributes where each property explicitly specifies both its XML attribute name and value. This gives more control but is more verbose than XmlAttributeComponent.

    new NextAttributeComponent({
    fontSize: { key: "w:sz", value: 24 },
    bold: { key: "w:b", value: true }
    });
    // Generates: _attr: { "w:sz": 24, "w:b": true }

    Type Parameters

    Hierarchy (View Summary)

    Index
    • get writtenAs(): readonly BaseXmlComponent[] | undefined
      Internal

      The components written in this one's place, one after another, when it can't be written as a single element, such as a run with another run in its children. Undefined when it is written as itself.

      Returns readonly BaseXmlComponent[] | undefined