added create picture run method
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user