Fix descriptions of demos
This commit is contained in:
@ -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 from 'docx' rather than '../build' if you install from npm
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import { Document, Packer, Paragraph, TextRun } from "../build";
|
import { Document, Packer, Paragraph, TextRun } from "../build";
|
||||||
|
@ -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 * as fs from "fs";
|
||||||
import { Document, Packer } from "../build";
|
import { Document, Packer } from "../build";
|
||||||
|
|
||||||
|
@ -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 from 'docx' rather than '../build' if you install from npm
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import { File, Packer, Paragraph, StyleLevel, TableOfContents } from "../build";
|
import { File, Packer, Paragraph, StyleLevel, TableOfContents } from "../build";
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// Numbered lists
|
||||||
|
// Import from 'docx' rather than '../build' if you install from npm
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import { Document, Indent, Numbering, Packer, Paragraph } from "../build";
|
import { Document, Indent, Numbering, Packer, Paragraph } from "../build";
|
||||||
|
|
||||||
|
@ -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 * as fs from "fs";
|
||||||
import { Document, ImportDotx, Packer, Paragraph } from "../build";
|
import { Document, ImportDotx, Packer, Paragraph } from "../build";
|
||||||
|
|
||||||
|
@ -1,15 +1,7 @@
|
|||||||
// Example of how you would create a table with float positions
|
// Example of how you would create a table with float positions
|
||||||
// Import from 'docx' rather than '../build' if you install from npm
|
// Import from 'docx' rather than '../build' if you install from npm
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import {
|
import { Document, Packer, Paragraph, RelativeHorizontalPosition, RelativeVerticalPosition, TableAnchorType, WidthType } from "../build";
|
||||||
Document,
|
|
||||||
Packer,
|
|
||||||
Paragraph,
|
|
||||||
RelativeHorizontalPosition,
|
|
||||||
RelativeVerticalPosition,
|
|
||||||
TableAnchorType,
|
|
||||||
WidthType,
|
|
||||||
} from "../build";
|
|
||||||
|
|
||||||
const doc = new Document();
|
const doc = new Document();
|
||||||
|
|
||||||
|
@ -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 from 'docx' rather than '../build' if you install from npm
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import { Document, Packer, Paragraph } from "../build";
|
import { Document, Packer, Paragraph } from "../build";
|
||||||
|
@ -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 from 'docx' rather than '../build' if you install from npm
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import { Document, Media, Packer, Table } from "../build";
|
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 image = Media.addImage(doc, fs.readFileSync("./demo/images/image1.jpeg"));
|
||||||
|
|
||||||
const table = new Table(2, 2);
|
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.createParagraph("Hello World");
|
||||||
doc.addTable(table);
|
doc.addTable(table);
|
||||||
|
@ -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 from 'docx' rather than '../build' if you install from npm
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
// import { Document, Packer, Paragraph } from "../build";
|
// import { Document, Packer, Paragraph } from "../build";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Scaling images
|
// Example how to display page numbers
|
||||||
// Import from 'docx' rather than '../build' if you install from npm
|
// Import from 'docx' rather than '../build' if you install from npm
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import { Document, Packer, PageNumberFormat, TextRun } from "../build";
|
import { Document, Packer, PageNumberFormat, TextRun } from "../build";
|
||||||
|
Reference in New Issue
Block a user