@ -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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,4 +1,14 @@
|
|||||||
import { GridSpan, TableCellBorders, TableCellWidth, VAlign, VerticalAlign, VMerge, VMergeType, WidthType } from "file/table/table-cell";
|
import {
|
||||||
|
GridSpan,
|
||||||
|
TableCellBorders,
|
||||||
|
TableCellShading,
|
||||||
|
TableCellWidth,
|
||||||
|
VAlign,
|
||||||
|
VerticalAlign,
|
||||||
|
VMerge,
|
||||||
|
VMergeType,
|
||||||
|
WidthType,
|
||||||
|
} from "file/table/table-cell";
|
||||||
import { IXmlableObject, XmlComponent } from "file/xml-components";
|
import { IXmlableObject, XmlComponent } from "file/xml-components";
|
||||||
import { Paragraph } from "../paragraph";
|
import { Paragraph } from "../paragraph";
|
||||||
import { TableGrid } from "./grid";
|
import { TableGrid } from "./grid";
|
||||||
@ -159,4 +169,10 @@ export class TableCellProperties extends XmlComponent {
|
|||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public setShading(attrs: object): TableCellProperties {
|
||||||
|
this.root.push(new TableCellShading(attrs));
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user