Make media return a picture run instead

This commit is contained in:
Dolan
2019-06-23 22:36:01 +01:00
parent 427dc86915
commit dfe986331d
6 changed files with 31 additions and 15 deletions

View File

@ -141,11 +141,12 @@ export class File {
width?: number,
height?: number,
drawingOptions?: IDrawingOptions,
): Image {
): Paragraph {
const image = Media.addImage(this, buffer, width, height, drawingOptions);
this.document.addParagraph(image.Paragraph);
const paragraph = new Paragraph(image);
this.document.addParagraph(paragraph);
return image;
return paragraph;
}
public createHyperlink(link: string, text?: string): Hyperlink {