Add table cell Shading

This commit is contained in:
巴里切罗
2018-07-27 15:54:41 +08:00
parent 1aa592b1b9
commit 807605c0cc
2 changed files with 31 additions and 1 deletions

View File

@ -205,3 +205,27 @@ export class TableCellWidth extends XmlComponent {
);
}
}
interface ITableCellShadingAttributesProperties {
fill?: string;
color?: string;
val?: string;
}
class TableCellShadingAttributes extends XmlAttributeComponent<ITableCellShadingAttributesProperties> {
protected xmlKeys = {
fill: "w:fill",
color: "w:color",
val: "w:val",
};
}
/**
* Table cell shading element.
*/
export class TableCellShading extends XmlComponent {
constructor(attrs: object) {
super("w:shd");
this.root.push(new TableCellShadingAttributes(attrs));
}
}