docx
Version:
Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
30 lines (24 loc) • 923 B
text/typescript
// http://officeopenxml.com/drwSp-SpPr.php
import { IMediaDataTransformation } from "file/media";
import { XmlComponent } from "file/xml-components";
import { Form } from "./form";
// import { NoFill } from "./no-fill";
// import { Outline } from "./outline/outline";
import { PresetGeometry } from "./preset-geometry/preset-geometry";
import { ShapePropertiesAttributes } from "./shape-properties-attributes";
export class ShapeProperties extends XmlComponent {
private readonly form: Form;
constructor(transform: IMediaDataTransformation) {
super("pic:spPr");
this.root.push(
new ShapePropertiesAttributes({
bwMode: "auto",
}),
);
this.form = new Form(transform);
this.root.push(this.form);
this.root.push(new PresetGeometry());
// this.root.push(new NoFill());
// this.root.push(new Outline());
}
}