Use context in prep xml
This commit is contained in:
@ -4,20 +4,24 @@ import * as fs from "fs";
|
||||
import { Document, ExternalHyperlink, Footer, FootnoteReferenceRun, Media, Packer, Paragraph, TextRun } from "../build";
|
||||
|
||||
const doc = new Document({
|
||||
footnotes: [
|
||||
new Paragraph({
|
||||
footnotes: {
|
||||
1: {
|
||||
children: [
|
||||
new TextRun("Click here for the "),
|
||||
new ExternalHyperlink({
|
||||
child: new TextRun({
|
||||
text: "Footnotes external hyperlink",
|
||||
style: "Hyperlink",
|
||||
}),
|
||||
link: "http://www.example.com",
|
||||
new Paragraph({
|
||||
children: [
|
||||
new TextRun("Click here for the "),
|
||||
new ExternalHyperlink({
|
||||
child: new TextRun({
|
||||
text: "Footnotes external hyperlink",
|
||||
style: "Hyperlink",
|
||||
}),
|
||||
link: "http://www.example.com",
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const image1 = Media.addImage(doc, fs.readFileSync("./demo/images/image1.jpeg"));
|
||||
@ -69,7 +73,7 @@ doc.addSection({
|
||||
}),
|
||||
link: "http://www.example.com",
|
||||
}),
|
||||
new FootnoteReferenceRun(1)
|
||||
new FootnoteReferenceRun(1),
|
||||
],
|
||||
}),
|
||||
new Paragraph({
|
||||
|
@ -27,25 +27,29 @@ import {
|
||||
*/
|
||||
|
||||
const doc = new Document({
|
||||
footnotes: [
|
||||
new Paragraph({
|
||||
footnotes: {
|
||||
1: {
|
||||
children: [
|
||||
new TextRun("This is a footnote"),
|
||||
new DeletedTextRun({
|
||||
text: " with some extra text which was deleted",
|
||||
id: 0,
|
||||
author: "Firstname Lastname",
|
||||
date: "2020-10-06T09:05:00Z",
|
||||
}),
|
||||
new InsertedTextRun({
|
||||
text: " and new content",
|
||||
id: 1,
|
||||
author: "Firstname Lastname",
|
||||
date: "2020-10-06T09:05:00Z",
|
||||
new Paragraph({
|
||||
children: [
|
||||
new TextRun("This is a footnote"),
|
||||
new DeletedTextRun({
|
||||
text: " with some extra text which was deleted",
|
||||
id: 0,
|
||||
author: "Firstname Lastname",
|
||||
date: "2020-10-06T09:05:00Z",
|
||||
}),
|
||||
new InsertedTextRun({
|
||||
text: " and new content",
|
||||
id: 1,
|
||||
author: "Firstname Lastname",
|
||||
date: "2020-10-06T09:05:00Z",
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
features: {
|
||||
trackRevisions: true,
|
||||
},
|
||||
|
Reference in New Issue
Block a user