Files
docx-js/ts/docx/xml-components/attributes.ts

48 lines
1.1 KiB
TypeScript
Raw Normal View History

2017-03-08 21:49:41 +00:00
import { XmlAttributeComponent } from "./default-attributes";
export interface IAttributesProperties {
2017-03-08 21:49:41 +00:00
val?: string | number | boolean;
color?: string;
space?: string;
sz?: string;
type?: string;
rsidR?: string;
rsidRPr?: string;
rsidSect?: string;
w?: string;
h?: string;
top?: string;
right?: string;
bottom?: string;
left?: string;
header?: string;
footer?: string;
gutter?: string;
linePitch?: string;
2017-03-09 23:32:52 +00:00
pos?: string | number; // Little strange. Perhaps it is normal. Need to clarify in the spec.
}
export class Attributes extends XmlAttributeComponent<IAttributesProperties> {
protected xmlKeys = {
val: "w:val",
color: "w:color",
space: "w:space",
sz: "w:sz",
type: "w:type",
rsidR: "w:rsidR",
rsidRPr: "w:rsidRPr",
rsidSect: "w:rsidSect",
w: "w:w",
h: "w:h",
top: "w:top",
right: "w:right",
bottom: "w:bottom",
left: "w:left",
header: "w:header",
footer: "w:footer",
gutter: "w:gutter",
linePitch: "w:linePitch",
pos: "w:pos",
};
2017-03-08 21:49:41 +00:00
}