import: add support to import any xml tab element to XmlComponent (#8)
- make method to import/convert to XmlComponent - expose method to add childElement to Header/Footer - add tests
This commit is contained in:
@ -3,6 +3,7 @@ import { IMediaData, Media } from "./media";
|
||||
import { Paragraph } from "./paragraph";
|
||||
import { Relationships } from "./relationships";
|
||||
import { Table } from "./table";
|
||||
import { XmlComponent } from ".";
|
||||
|
||||
export class HeaderWrapper {
|
||||
private readonly header: Header;
|
||||
@ -35,6 +36,10 @@ export class HeaderWrapper {
|
||||
this.header.addDrawing(imageData);
|
||||
}
|
||||
|
||||
public addChildElement(childElement: XmlComponent | string) {
|
||||
this.header.addChildElement(childElement);
|
||||
}
|
||||
|
||||
public createImage(image: string): void {
|
||||
const mediaData = this.media.addMedia(image, this.relationships.RelationshipCount);
|
||||
this.relationships.createRelationship(
|
||||
|
Reference in New Issue
Block a user