Fix descriptions of demos

This commit is contained in:
Dolan
2019-02-26 22:20:20 +00:00
parent 918faf59c3
commit 5ae541a40d
10 changed files with 14 additions and 16 deletions

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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();

View File

@ -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";

View File

@ -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);

View File

@ -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";

View File

@ -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";