Mandatory Sections
This commit is contained in:
@ -5,19 +5,24 @@ import { Document, Packer, Paragraph, TextRun } from "../build";
|
||||
|
||||
const doc = new Document();
|
||||
|
||||
const paragraph = new Paragraph("Hello World");
|
||||
const institutionText = new TextRun({
|
||||
text: "Foo Bar",
|
||||
bold: true,
|
||||
doc.addSection({
|
||||
properties: {},
|
||||
children: [
|
||||
new Paragraph({
|
||||
children: [
|
||||
new TextRun("Hello World"),
|
||||
new TextRun({
|
||||
text: "Foo Bar",
|
||||
bold: true,
|
||||
}),
|
||||
new TextRun({
|
||||
text: "Github is the best",
|
||||
bold: true,
|
||||
}).tab(),
|
||||
],
|
||||
}),
|
||||
],
|
||||
});
|
||||
const dateText = new TextRun({
|
||||
text: "Github is the best",
|
||||
bold: true,
|
||||
}).tab();
|
||||
paragraph.addRun(institutionText);
|
||||
paragraph.addRun(dateText);
|
||||
|
||||
doc.add(paragraph);
|
||||
|
||||
const packer = new Packer();
|
||||
|
||||
|
Reference in New Issue
Block a user