From 30b21217a9dc20fec7a70ceb0193b4fbe8a6bb7f Mon Sep 17 00:00:00 2001 From: Dolan Date: Mon, 13 Mar 2017 23:41:14 +0000 Subject: [PATCH] added create picture run method --- ts/docx/paragraph/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) 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;