Mandatory Sections

This commit is contained in:
Dolan Miu
2019-07-31 08:48:02 +01:00
parent bf80311ef7
commit ac5b15d0e3
63 changed files with 1194 additions and 1588 deletions

View File

@ -9,25 +9,23 @@ const doc = new Document({
externalStyles: styles,
});
doc.add(new Paragraph({
text: "Cool Heading Text",
heading: HeadingLevel.HEADING_1,
}));
const paragraph = new Paragraph({
text: 'This is a custom named style from the template "MyFancyStyle"',
style: "MyFancyStyle",
doc.addSection({
children: [
new Paragraph({
text: "Cool Heading Text",
heading: HeadingLevel.HEADING_1,
}),
new Paragraph({
text: 'This is a custom named style from the template "MyFancyStyle"',
style: "MyFancyStyle",
}),
new Paragraph("Some normal text"),
new Paragraph({
text: "MyFancyStyle again",
style: "MyFancyStyle",
}),
],
});
doc.add(paragraph);
doc.add(new Paragraph("Some normal text"));
doc.add(new Paragraph({
text: "MyFancyStyle again",
style: "MyFancyStyle",
}));
doc.add(paragraph);
const packer = new Packer();