docx
    Preparing search index...

    Class CellMergeAttributes

    Base class for creating XML attributes with automatic name mapping.

    XmlAttributeComponent allows you to define attributes using JavaScript-friendly property names that are automatically mapped to XML attribute names. Subclasses can define an xmlKeys map to specify the transformation.

    class MyAttributes extends XmlAttributeComponent<{ fontSize: number }> {
    protected readonly xmlKeys = { fontSize: "w:sz" };
    }

    new MyAttributes({ fontSize: 24 });
    // Generates: _attr: { "w:sz": 24 }

    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