Files
docx-js/src/docx/run/run-components/drawing/index.ts
2017-12-15 00:01:59 +00:00

17 lines
429 B
TypeScript

import { IData } from "../../../../media/data";
import { XmlComponent } from "../../../xml-components";
import { Inline } from "./inline";
export class Drawing extends XmlComponent {
constructor(imageData: IData) {
super("w:drawing");
if (imageData === undefined) {
throw new Error("imageData cannot be undefined");
}
this.root.push(new Inline(imageData.referenceId));
}
}