Add footnotes as part of export

This commit is contained in:
Dolan
2018-06-11 00:48:50 +01:00
parent 6085f69c22
commit c19a2e71b5
3 changed files with 13 additions and 1 deletions

View File

@ -40,6 +40,7 @@ export class Compiler {
const xmlFooterRelationships = xml(this.formatter.format(this.file.Footer.Relationships));
const xmlContentTypes = xml(this.formatter.format(this.file.ContentTypes));
const xmlAppProperties = xml(this.formatter.format(this.file.AppProperties));
const xmlFootnotes = xml(this.formatter.format(this.file.FootNotes));
this.archive.append(xmlDocument, {
name: "word/document.xml",
@ -73,6 +74,10 @@ export class Compiler {
name: "word/footer1.xml",
});
this.archive.append(xmlFootnotes, {
name: "word/footnotes.xml",
});
this.archive.append(xmlRelationships, {
name: "word/_rels/document.xml.rels",
});

View File

@ -82,6 +82,12 @@ export class File {
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",
"footer1.xml",
);
this.docRelationships.createRelationship(
5,
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",
"footnotes.xml",
);
this.media = new Media();
this.headerWrapper = new HeaderWrapper(this.media);

View File

@ -14,7 +14,8 @@ export type RelationshipType =
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"
| "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink";
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes";
export type TargetModeType = "External";