Make Paragraph declaritive
This commit is contained in:
@ -1,22 +1,23 @@
|
||||
// http://officeopenxml.com/WPalignment.php
|
||||
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||
|
||||
export enum AlignmentOptions {
|
||||
export enum AlignmentType {
|
||||
START = "start",
|
||||
END = "end",
|
||||
CENTER = "center",
|
||||
BOTH = "both",
|
||||
JUSTIFIED = "both",
|
||||
DISTRIBUTE = "distribute",
|
||||
LEFT = "left",
|
||||
RIGHT = "right",
|
||||
}
|
||||
|
||||
export class AlignmentAttributes extends XmlAttributeComponent<{ readonly val: AlignmentOptions }> {
|
||||
export class AlignmentAttributes extends XmlAttributeComponent<{ readonly val: AlignmentType }> {
|
||||
protected readonly xmlKeys = { val: "w:val" };
|
||||
}
|
||||
|
||||
export class Alignment extends XmlComponent {
|
||||
constructor(type: AlignmentOptions) {
|
||||
constructor(type: AlignmentType) {
|
||||
super("w:jc");
|
||||
this.root.push(new AlignmentAttributes({ val: type }));
|
||||
}
|
||||
|
Reference in New Issue
Block a user