Context per view wrapper

This commit is contained in:
Dolan Miu
2023-03-13 21:35:16 +00:00
parent 0fba450c9a
commit 8ce057e25c
2 changed files with 42 additions and 9 deletions

View File

@ -42,7 +42,23 @@ patchDocument(fs.readFileSync("demo/assets/simple-template.docx"), {
},
paragraph_replace: {
type: PatchType.DOCUMENT,
children: [new Paragraph("Lorem ipsum paragraph"), new Paragraph("Another paragraph")],
children: [
new Paragraph("Lorem ipsum paragraph"),
new Paragraph("Another paragraph"),
new Paragraph({
children: [
new TextRun("This is a "),
new ExternalHyperlink({
children: [
new TextRun({
text: "Google Link",
}),
],
link: "https://www.google.co.uk",
}),
],
}),
],
},
header_adjective: {
type: PatchType.PARAGRAPH,