adds textDirection to table cells

This commit is contained in:
bs595r
2020-05-10 10:36:25 -07:00
parent 3eca81d3f5
commit 25a7ce3742
5 changed files with 93 additions and 3 deletions

View File

@ -158,6 +158,31 @@ export class VAlign extends XmlComponent {
}
}
export enum TextDirection {
BOTTOMTOTOPLEFTTORIGHT = "btLr",
LEFTTORIGHTTOPTOBOTTOM = "lrTb",
TOPTOBOTTOMRIGHTTOLEFT = "tbRl",
}
class TDirectionAttributes extends XmlAttributeComponent<{ readonly val: TextDirection }> {
protected readonly xmlKeys = { val: "w:val" };
}
/**
* Text Direction within a table cell
*/
export class TDirection extends XmlComponent {
constructor(value: TextDirection) {
super("w:textDirection");
this.root.push(
new TDirectionAttributes({
val: value,
}),
);
}
}
export enum WidthType {
/** Auto. */
AUTO = "auto",