diff --git a/demo/demo10.ts b/demo/demo10.ts index 5d207d5783..7dcc1befab 100644 --- a/demo/demo10.ts +++ b/demo/demo10.ts @@ -1,4 +1,4 @@ -// Add images to header and footer +// Generate a CV // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; import { Document, Packer, Paragraph, TextRun } from "../build"; diff --git a/demo/demo27.ts b/demo/demo27.ts index a233cd9afd..a5022a1d18 100644 --- a/demo/demo27.ts +++ b/demo/demo27.ts @@ -1,3 +1,5 @@ +// Custom styles using JavaScript configuration +// Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; import { Document, Packer } from "../build"; diff --git a/demo/demo28.ts b/demo/demo28.ts index d13acf5b46..aec36f5bfd 100644 --- a/demo/demo28.ts +++ b/demo/demo28.ts @@ -1,4 +1,4 @@ -// Creates two paragraphs, one with a border and one without +// Table of contents // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; import { File, Packer, Paragraph, StyleLevel, TableOfContents } from "../build"; diff --git a/demo/demo29.ts b/demo/demo29.ts index 08fc139de6..0439d372d7 100644 --- a/demo/demo29.ts +++ b/demo/demo29.ts @@ -1,3 +1,5 @@ +// Numbered lists +// Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; import { Document, Indent, Numbering, Packer, Paragraph } from "../build"; diff --git a/demo/demo30.ts b/demo/demo30.ts index a587e42b7a..ad7867a9c0 100644 --- a/demo/demo30.ts +++ b/demo/demo30.ts @@ -1,3 +1,5 @@ +// Example on how to use a template document +// Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; import { Document, ImportDotx, Packer, Paragraph } from "../build"; diff --git a/demo/demo34.ts b/demo/demo34.ts index 2a46308394..3b0630a2bf 100644 --- a/demo/demo34.ts +++ b/demo/demo34.ts @@ -1,15 +1,7 @@ // Example of how you would create a table with float positions // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { - Document, - Packer, - Paragraph, - RelativeHorizontalPosition, - RelativeVerticalPosition, - TableAnchorType, - WidthType, -} from "../build"; +import { Document, Packer, Paragraph, RelativeHorizontalPosition, RelativeVerticalPosition, TableAnchorType, WidthType } from "../build"; const doc = new Document(); diff --git a/demo/demo35.ts b/demo/demo35.ts index 029c3fbfff..05ef010c1a 100644 --- a/demo/demo35.ts +++ b/demo/demo35.ts @@ -1,4 +1,4 @@ -// Simple example to add text to a document +// Example on how to add hyperlinks to websites // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; import { Document, Packer, Paragraph } from "../build"; diff --git a/demo/demo36.ts b/demo/demo36.ts index e9db47f25c..1066c2a4d9 100644 --- a/demo/demo36.ts +++ b/demo/demo36.ts @@ -1,4 +1,4 @@ -// Add images to header and footer +// Add image to table cell // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; import { Document, Media, Packer, Table } from "../build"; @@ -7,7 +7,7 @@ const doc = new Document(); const image = Media.addImage(doc, fs.readFileSync("./demo/images/image1.jpeg")); const table = new Table(2, 2); -table.getCell(1, 1).addContent(image.Paragraph); +table.getCell(1, 1).addParagraph(image.Paragraph); // doc.createParagraph("Hello World"); doc.addTable(table); diff --git a/demo/demo38.ts b/demo/demo38.ts index 3c9b638959..d3e5fb2688 100644 --- a/demo/demo38.ts +++ b/demo/demo38.ts @@ -1,4 +1,4 @@ -// Example of how to add images to the document - You can use Buffers, UInt8Arrays or Base64 strings +// Example of how to "wrap" text around an image // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; // import { Document, Packer, Paragraph } from "../build"; diff --git a/demo/demo39.ts b/demo/demo39.ts index d06aec50b2..cd87bc4bcb 100644 --- a/demo/demo39.ts +++ b/demo/demo39.ts @@ -1,4 +1,4 @@ -// Scaling images +// Example how to display page numbers // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; import { Document, Packer, PageNumberFormat, TextRun } from "../build";