added paragraph styles

This commit is contained in:
Dolan Miu
2016-03-29 04:10:33 +01:00
parent 18c92426ad
commit c2b215e81b
6 changed files with 214 additions and 46 deletions

View File

@ -5,18 +5,24 @@ export interface P {
export class Attributes implements P {
private _attrs: Object;
constructor() {
this._attrs = {};
constructor(value?: string) {
this._attrs = {
val: value
};
}
}
export class ParagraphProperties implements P {
export class ParagraphProperties implements P{
private pPr: Array<P>;
constructor() {
this.pPr = new Array<P>();
this.pPr.push(new Attributes());
}
push(item: P) {
this.pPr.push(item);
}
}
export class Run implements P {
@ -24,6 +30,7 @@ export class Run implements P {
constructor(text: string) {
this.r = new Array<P>();
this.r.push(new ParagraphProperties());
this.r.push(new Text(text));
}
}