added create picture run method
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
import { Num } from "../../numbering/num";
|
import { Num } from "../../numbering/num";
|
||||||
import { Run } from "../run";
|
import { Run } from "../run";
|
||||||
|
import { PictureRun } from "../run/picture-run";
|
||||||
import { TextRun } from "../run/text-run";
|
import { TextRun } from "../run/text-run";
|
||||||
import { XmlComponent } from "../xml-components";
|
import { XmlComponent } from "../xml-components";
|
||||||
|
|
||||||
@ -36,6 +37,12 @@ export class Paragraph extends XmlComponent {
|
|||||||
return run;
|
return run;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public createPictureRun(imagePath: string): PictureRun {
|
||||||
|
const run = new PictureRun(imagePath);
|
||||||
|
this.addRun(run);
|
||||||
|
return run;
|
||||||
|
}
|
||||||
|
|
||||||
public heading1(): Paragraph {
|
public heading1(): Paragraph {
|
||||||
this.properties.push(new Style("Heading1"));
|
this.properties.push(new Style("Heading1"));
|
||||||
return this;
|
return this;
|
||||||
|
Reference in New Issue
Block a user