Files
docx-js/src/file/paragraph/run/picture-run.ts

16 lines
384 B
TypeScript
Raw Normal View History

2017-12-19 23:13:11 +00:00
import { Drawing } from "../../drawing";
import { IMediaData } from "../../media/data";
import { Run } from "../run";
export class PictureRun extends Run {
constructor(imageData: IMediaData) {
super();
2017-04-01 12:18:23 +01:00
if (imageData === undefined) {
throw new Error("imageData cannot be undefined");
}
this.root.push(new Drawing(imageData));
}
}