ability to specify textDirection for section

This commit is contained in:
Katz Sakai
2021-11-19 22:30:38 +09:00
parent c01d3d9f67
commit 9cddfb4ce7
5 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,22 @@
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
export enum PageTextDirection {
LEFT_TO_RIGHT_TOP_TO_BOTTOM = "lrTb",
TOP_TO_BOTTOM_RIGHT_TO_LEFT = "tbRl",
}
class PageTextDirectionAttributes extends XmlAttributeComponent<{ readonly val: PageTextDirection }> {
protected readonly xmlKeys = { val: "w:val" };
}
export class PageTDirection extends XmlComponent {
constructor(value: PageTextDirection) {
super("w:textDirection");
this.root.push(
new PageTextDirectionAttributes({
val: value,
}),
);
}
}