add paragraph#style method to quickly set the style

This commit is contained in:
felipe
2017-03-09 09:46:12 +01:00
parent f5144e6d72
commit 18ca93e50a
3 changed files with 23 additions and 1 deletions

View File

@ -1,4 +1,4 @@
import { XmlAttributeComponent, XmlComponent } from "../docx/xml-components";
import { XmlAttributeComponent, XmlComponent } from "../xml-components";
interface IndentAttributesProperties {
left: number;

View File

@ -119,6 +119,11 @@ export class Paragraph extends XmlComponent {
return this;
}
public style(styleId: string): Paragraph {
this.properties.push(new Style(styleId));
return this;
}
public indent(start: number, hanging?: number): Paragraph {
this.properties.push(new Indent(start, hanging));
return this;