more alignments
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
// http://officeopenxml.com/WPalignment.php
|
||||
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||
|
||||
export type AlignmentOptions = "left" | "center" | "right" | "both";
|
||||
export type AlignmentOptions = "start" | "end" | "center" | "both" | "distribute" | "left" | "right";
|
||||
|
||||
export class AlignmentAttributes extends XmlAttributeComponent<{ val: AlignmentOptions }> {
|
||||
protected xmlKeys = { val: "w:val" };
|
||||
|
@ -110,6 +110,21 @@ export class Paragraph extends XmlComponent {
|
||||
return this;
|
||||
}
|
||||
|
||||
public start(): Paragraph {
|
||||
this.properties.push(new Alignment("start"));
|
||||
return this;
|
||||
}
|
||||
|
||||
public end(): Paragraph {
|
||||
this.properties.push(new Alignment("end"));
|
||||
return this;
|
||||
}
|
||||
|
||||
public distribute(): Paragraph {
|
||||
this.properties.push(new Alignment("distribute"));
|
||||
return this;
|
||||
}
|
||||
|
||||
public justified(): Paragraph {
|
||||
this.properties.push(new Alignment("both"));
|
||||
return this;
|
||||
|
Reference in New Issue
Block a user