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 { Footer } from "./footer/footer";
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 FooterWrapper {
"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): FooterWrapper {
this.footer.addParagraph(image);
this.footer.addParagraph(image.Paragraph);
return this;
}