Files
docx-js/ts/docx/table/properties.ts

25 lines
557 B
TypeScript
Raw Normal View History

2017-03-07 19:22:10 +01:00
import {XmlComponent, Attributes} from "../xml-components";
export class TableProperties extends XmlComponent {
private width: PreferredTableWidth;
constructor() {
super('w:tblPr');
}
setWidth(type: string, w: string) {
this.width = new PreferredTableWidth(type, w);
this.root.push(this.width);
}
}
class PreferredTableWidth extends XmlComponent {
constructor(type: string, w: string) {
super('w:tblW');
this.root.push(new Attributes({
type,
w,
}))
}
}