Deploy dolanmiu/docx to github.com/dolanmiu/docx.git:gh-pages

This commit is contained in:
Deployment Bot (from Travis CI)
2021-03-20 00:01:19 +00:00
parent 63c399b66b
commit be607b576d
299 changed files with 2098 additions and 2085 deletions

View File

@ -35,20 +35,24 @@ const paragraph = new Paragraph({
After you create the paragraph, you must add the paragraph into a `section`:
```ts
doc.addSection({
children: [paragraph],
const doc = new Document({
sections: [{
children: [paragraph],
}];
});
```
Or the preferred convension, define the paragraph inside the section and remove the usage of variables:
```ts
doc.addSection({
children: [
new Paragraph({
children: [new TextRun("Lorem Ipsum Foo Bar"), new TextRun("Hello World")],
}),
],
const doc = new Document({
sections: [{
children: [
new Paragraph({
children: [new TextRun("Lorem Ipsum Foo Bar"), new TextRun("Hello World")],
}),
],
}];
});
```