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

44 lines
770 B
TypeScript
Raw Normal View History

2016-03-28 03:55:33 +01:00
export interface P {
}
export class Attributes implements P {
private _attrs: Object;
2016-03-29 04:10:33 +01:00
constructor(value?: string) {
this._attrs = {
val: value
};
2016-03-28 03:55:33 +01:00
}
}
2016-03-29 04:10:33 +01:00
export class ParagraphProperties implements P{
2016-03-28 03:55:33 +01:00
private pPr: Array<P>;
constructor() {
this.pPr = new Array<P>();
this.pPr.push(new Attributes());
}
2016-03-29 04:10:33 +01:00
push(item: P) {
this.pPr.push(item);
}
2016-03-28 03:55:33 +01:00
}
export class Run implements P {
private r: Array<P>;
constructor(text: string) {
this.r = new Array<P>();
2016-03-29 04:10:33 +01:00
this.r.push(new ParagraphProperties());
2016-03-28 03:55:33 +01:00
this.r.push(new Text(text));
}
}
export class Text implements P {
private t: string;
constructor(text: string) {
this.t = text;
}
}