Change image API so that it now sends Images
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
// http://officeopenxml.com/WPfooters.php
|
||||
import { IMediaData } from "file/media";
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
import { Paragraph, PictureRun } from "../paragraph";
|
||||
import { Paragraph } from "../paragraph";
|
||||
import { Table } from "../table";
|
||||
import { FooterAttributes } from "./footer-attributes";
|
||||
|
||||
@ -36,8 +35,10 @@ export class Footer extends XmlComponent {
|
||||
return this.refId;
|
||||
}
|
||||
|
||||
public addParagraph(paragraph: Paragraph): void {
|
||||
public addParagraph(paragraph: Paragraph): Footer {
|
||||
this.root.push(paragraph);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public createParagraph(text?: string): Paragraph {
|
||||
@ -55,12 +56,4 @@ export class Footer extends XmlComponent {
|
||||
this.addTable(table);
|
||||
return table;
|
||||
}
|
||||
|
||||
public addDrawing(imageData: IMediaData): void {
|
||||
const paragraph = new Paragraph();
|
||||
const run = new PictureRun(imageData);
|
||||
paragraph.addRun(run);
|
||||
|
||||
this.root.push(paragraph);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user