diff --git a/ts/docx/paragraph/index.ts b/ts/docx/paragraph/index.ts index 4ae172eb1b..a63861c3a7 100644 --- a/ts/docx/paragraph/index.ts +++ b/ts/docx/paragraph/index.ts @@ -1,5 +1,6 @@ import { Num } from "../../numbering/num"; import { Run } from "../run"; +import { PictureRun } from "../run/picture-run"; import { TextRun } from "../run/text-run"; import { XmlComponent } from "../xml-components"; @@ -36,6 +37,12 @@ export class Paragraph extends XmlComponent { return run; } + public createPictureRun(imagePath: string): PictureRun { + const run = new PictureRun(imagePath); + this.addRun(run); + return run; + } + public heading1(): Paragraph { this.properties.push(new Style("Heading1")); return this;