Add image to run

This commit is contained in:
Dolan
2018-08-09 01:55:50 +01:00
parent 94274733f4
commit e10c20fa42
9 changed files with 43 additions and 20 deletions

View File

@ -1,7 +1,7 @@
import { XmlComponent } from "file/xml-components";
import { Header } from "./header/header";
import { Media } from "./media";
import { Image, Paragraph } from "./paragraph";
import { Image, Media } from "./media";
import { ImageParagraph, Paragraph } from "./paragraph";
import { Relationships } from "./relationships";
import { Table } from "./table";
@ -43,11 +43,11 @@ export class HeaderWrapper {
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",
`media/${mediaData.fileName}`,
);
this.addImage(new Image(mediaData));
this.addImage(new Image(new ImageParagraph(mediaData)));
}
public addImage(image: Image): HeaderWrapper {
this.header.addParagraph(image);
this.header.addParagraph(image.Paragraph);
return this;
}