added xmlKeys to xmlcomponent
This commit is contained in:
@ -1,7 +1,11 @@
|
||||
import {XmlComponent, Attributes} from "../../xml-components";
|
||||
|
||||
export class Columns {
|
||||
export class Columns implements XmlComponent {
|
||||
private cols: Array<XmlComponent>;
|
||||
|
||||
xmlKeys = {
|
||||
cols: 'w:cols'
|
||||
}
|
||||
|
||||
constructor() {
|
||||
this.cols = new Array<XmlComponent>();
|
||||
|
@ -1,7 +1,11 @@
|
||||
import {XmlComponent, Attributes} from "../../xml-components";
|
||||
|
||||
export class DocumentGrid {
|
||||
export class DocumentGrid implements XmlComponent {
|
||||
private docGrid: Array<XmlComponent>;
|
||||
|
||||
xmlKeys = {
|
||||
docGrid: 'w:docGrid'
|
||||
}
|
||||
|
||||
constructor() {
|
||||
this.docGrid = new Array<XmlComponent>();
|
||||
|
@ -5,9 +5,13 @@ import {PageMargin} from "./page-margin";
|
||||
import {Columns} from "./columns";
|
||||
import {DocumentGrid} from "./doc-grid";
|
||||
|
||||
export class Body {
|
||||
export class Body implements XmlComponent {
|
||||
private body: Array<XmlComponent>;
|
||||
|
||||
|
||||
xmlKeys = {
|
||||
body: 'w:body'
|
||||
}
|
||||
|
||||
constructor() {
|
||||
this.body = new Array<XmlComponent>();
|
||||
this.body.push(new SectionProperties());
|
||||
@ -16,7 +20,7 @@ export class Body {
|
||||
this.body.push(new Columns());
|
||||
this.body.push(new DocumentGrid());
|
||||
}
|
||||
|
||||
|
||||
push(component: XmlComponent) {
|
||||
this.body.push(component);
|
||||
}
|
||||
|
@ -1,7 +1,11 @@
|
||||
import {XmlComponent, Attributes} from "../../xml-components";
|
||||
|
||||
export class PageMargin {
|
||||
export class PageMargin implements XmlComponent {
|
||||
private pgMar: Array<XmlComponent>;
|
||||
|
||||
xmlKeys = {
|
||||
pgMar: 'w:pgMar'
|
||||
}
|
||||
|
||||
constructor() {
|
||||
this.pgMar = new Array<XmlComponent>();
|
||||
|
@ -1,7 +1,11 @@
|
||||
import {XmlComponent, Attributes} from "../../xml-components";
|
||||
|
||||
export class PageSize {
|
||||
export class PageSize implements XmlComponent {
|
||||
private pgSz: Array<XmlComponent>;
|
||||
|
||||
xmlKeys = {
|
||||
pgSz: 'w:pgSz'
|
||||
}
|
||||
|
||||
constructor() {
|
||||
this.pgSz = new Array<XmlComponent>();
|
||||
|
@ -1,8 +1,12 @@
|
||||
import {XmlComponent, Attributes} from "../../xml-components";
|
||||
|
||||
export class SectionProperties {
|
||||
export class SectionProperties implements XmlComponent {
|
||||
private sectPr: Array<XmlComponent>;
|
||||
|
||||
xmlKeys = {
|
||||
sectPr: 'sectPr'
|
||||
}
|
||||
|
||||
constructor() {
|
||||
this.sectPr = new Array<XmlComponent>();
|
||||
this.sectPr.push(new Attributes({
|
||||
|
Reference in New Issue
Block a user