added Spacing for paragraphs and ParagraphStyle

This commit is contained in:
felipe
2017-03-09 12:12:33 +01:00
parent 449d1bc2c3
commit 20ec9b679e
6 changed files with 93 additions and 0 deletions

View File

@ -0,0 +1,24 @@
import { XmlAttributeComponent, XmlComponent } from "../xml-components";
export interface ISpacingProperties {
after?: number;
before?: number;
line?: number;
}
class SpacingAttributes extends XmlAttributeComponent {
constructor(properties: ISpacingProperties) {
super({
after: "w:after",
before: "w:before",
line: "w:line",
}, properties);
}
}
export class Spacing extends XmlComponent {
constructor(opts: ISpacingProperties) {
super("w:spacing");
this.root.push(new SpacingAttributes(opts));
}
}