put contents inside sectPr
This commit is contained in:
@ -1,9 +1,5 @@
|
||||
import {XmlComponent, Attributes} from "../../xml-components";
|
||||
import {SectionProperties} from "./section-properties";
|
||||
import {PageSize} from "./page-size";
|
||||
import {PageMargin} from "./page-margin";
|
||||
import {Columns} from "./columns";
|
||||
import {DocumentGrid} from "./doc-grid";
|
||||
|
||||
export class Body implements XmlComponent {
|
||||
private body: Array<XmlComponent>;
|
||||
@ -14,14 +10,10 @@ export class Body implements XmlComponent {
|
||||
|
||||
constructor() {
|
||||
this.body = new Array<XmlComponent>();
|
||||
this.body.push(new SectionProperties());
|
||||
this.body.push(new PageSize());
|
||||
this.body.push(new PageMargin());
|
||||
this.body.push(new Columns());
|
||||
this.body.push(new DocumentGrid());
|
||||
//this.body.push(new SectionProperties());
|
||||
}
|
||||
|
||||
push(component: XmlComponent) {
|
||||
this.body.push(component);
|
||||
this.body.splice(this.body.length - 1, 0, component);
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,16 @@
|
||||
import {XmlComponent, Attributes} from "../../xml-components";
|
||||
import {PageSize} from "./page-size";
|
||||
import {PageMargin} from "./page-margin";
|
||||
import {Columns} from "./columns";
|
||||
import {DocumentGrid} from "./doc-grid";
|
||||
|
||||
export class SectionProperties implements XmlComponent {
|
||||
private sectPr: Array<XmlComponent>;
|
||||
|
||||
|
||||
xmlKeys = {
|
||||
sectPr: 'w:sectPr'
|
||||
}
|
||||
|
||||
|
||||
constructor() {
|
||||
this.sectPr = new Array<XmlComponent>();
|
||||
this.sectPr.push(new Attributes({
|
||||
@ -14,5 +18,9 @@ export class SectionProperties implements XmlComponent {
|
||||
rsidRPr: "00D842E4",
|
||||
rsidSect: "000A6AD0"
|
||||
}));
|
||||
this.sectPr.push(new PageSize());
|
||||
this.sectPr.push(new PageMargin());
|
||||
this.sectPr.push(new Columns());
|
||||
this.sectPr.push(new DocumentGrid());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user