Creates a new attribute component.
The attribute data object
Optional Readonlybottom?: stringBottom margin/spacing (w:bottom).
Optional Readonlycolor?: stringColor value (w:color).
Optional Readonlyfill?: stringFill color (w:fill).
Optional Readonlyfooter?: stringFooter margin (w:footer).
Optional Readonlygutter?: stringGutter margin (w:gutter).
Optional Readonlyh?: stringHeight (w:h).
Optional Readonlyheader?: stringHeader margin (w:header).
Optional Readonlyleft?: stringLeft margin/spacing (w:left).
Optional ReadonlylinePitch?: stringLine pitch (w:linePitch).
Optional Readonlypos?: string | numberPosition value (w:pos).
Optional Readonlyright?: stringRight margin/spacing (w:right).
Optional ReadonlyrsidR?: stringRevision ID for run content (w:rsidR).
Optional ReadonlyrsidRPr?: stringRevision ID for run properties (w:rsidRPr).
Optional ReadonlyrsidSect?: stringRevision ID for section (w:rsidSect).
Optional Readonlyspace?: stringSpace preservation (w:space).
Optional Readonlysz?: stringSize value (w:sz).
Optional Readonlytop?: stringTop margin/spacing (w:top).
Optional Readonlytype?: stringType specification (w:type).
Optional Readonlyval?: string | number | booleanGeneric value attribute (w:val).
Optional Readonlyw?: stringWidth (w:w).
Converts the attribute data to an XML-serializable object.
This method transforms the property names using xmlKeys (if defined) and filters out undefined values.
Context (unused for attributes)
Object with _attr key containing the mapped attributes
Common XML attributes used across WordprocessingML elements.
This class provides a convenient way to add common attributes to XML elements. It automatically maps JavaScript-friendly property names to their corresponding w: (WordprocessingML) namespace prefixed XML attribute names.
Example