From bb277a4a767ebef6364db40010cc9bfbed82a2ed Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 3 Jan 2019 20:47:00 +0000 Subject: [PATCH] Format demo --- demo/demo35.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/demo/demo35.ts b/demo/demo35.ts index a91ad2347d..029c3fbfff 100644 --- a/demo/demo35.ts +++ b/demo/demo35.ts @@ -1,11 +1,12 @@ // Simple example to add text to a document // Import from 'docx' rather than '../build' if you install from npm import * as fs from "fs"; -import { Document, Packer, Paragraph, TextRun } from "../build"; +import { Document, Packer, Paragraph } from "../build"; + +const doc = new Document(); +const paragraph = new Paragraph(); +const link = doc.createHyperlink("http://www.example.com", "Hyperlink"); -var doc = new Document(); -var paragraph = new Paragraph(); -var link = doc.createHyperlink('http://www.example.com', 'Hyperlink'); link.bold(); paragraph.addHyperLink(link); doc.addParagraph(paragraph);