added paragraph and run property xml components
This commit is contained in:
@ -124,11 +124,60 @@ export class Attributes extends XmlAttributeComponent {
|
|||||||
footer: "w:footer",
|
footer: "w:footer",
|
||||||
gutter: "w:gutter",
|
gutter: "w:gutter",
|
||||||
linePitch: "w:linePitch"
|
linePitch: "w:linePitch"
|
||||||
});
|
}, properties);
|
||||||
this.root = properties
|
|
||||||
|
|
||||||
if (!properties) {
|
|
||||||
this.root = {};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class ParagraphPropertyXmlComponent extends XmlComponent {
|
||||||
|
private paragraphProperties: ParagraphProperties;
|
||||||
|
|
||||||
|
constructor(rootKey) {
|
||||||
|
super(rootKey);
|
||||||
|
this.paragraphProperties = new ParagraphProperties();
|
||||||
|
this.root.push(this.paragraphProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
clearVariables(): void {
|
||||||
|
this.paragraphProperties.clearVariables();
|
||||||
|
|
||||||
|
delete this.paragraphProperties;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class RunPropertyXmlComponent extends XmlComponent {
|
||||||
|
private runProperties: RunProperties;
|
||||||
|
|
||||||
|
constructor(rootKey) {
|
||||||
|
super(rootKey);
|
||||||
|
this.runProperties = new RunProperties();
|
||||||
|
this.root.push(this.runProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
clearVariables(): void {
|
||||||
|
this.runProperties.clearVariables();
|
||||||
|
|
||||||
|
delete this.runProperties;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class MultiPropertyXmlComponent extends XmlComponent {
|
||||||
|
private runProperties: RunProperties;
|
||||||
|
private paragraphProperties: ParagraphProperties;
|
||||||
|
|
||||||
|
constructor(rootKey) {
|
||||||
|
super(rootKey);
|
||||||
|
this.runProperties = new RunProperties();
|
||||||
|
this.root.push(this.runProperties);
|
||||||
|
|
||||||
|
this.paragraphProperties = new ParagraphProperties();
|
||||||
|
this.root.push(this.paragraphProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
clearVariables(): void {
|
||||||
|
this.runProperties.clearVariables();
|
||||||
|
this.paragraphProperties.clearVariables();
|
||||||
|
|
||||||
|
delete this.runProperties;
|
||||||
|
delete this.paragraphProperties;
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user