diff --git a/README.md b/README.md index 07fdfba3a4..467a7c2638 100644 --- a/README.md +++ b/README.md @@ -332,43 +332,7 @@ exporter.pack('My Document'); ``` # Examples -## In practice -I used this library in my personal portfolio/CV website. Click generate CV for a demonstration. [http://www.dolan.bio](http://www.dolan.bio) - -## General -#### Simple paragraph -```js -var doc = new docx.Document(); - -var paragraph = new docx.Paragraph("Hello World"); -var institutionText = new docx.TextRun("University College London").bold(), -var dateText = new docx.TextRun("5th Dec 2015").tab().bold(); -paragraph.addText(institutionText); -paragraph.addText(dateText); - -doc.addParagraph(paragraph); -var exporter = new docx.LocalPacker(doc); -exporter.pack('My Document'); -``` - -Or: -```js -var doc = new docx.Document(); - -var paragraph = new docx.Paragraph("Hello World"); -var institutionText = new docx.TextRun("University College London").bold(), -var dateText = new docx.TextRun("5th Dec 2015").tab().bold(); -paragraph.addText(institutionText); -paragraph.addText(dateText); - -var exporter = new docx.ExpressPacker(doc, res); -exporter.pack('My Document'); -``` -Would produce: - -***University College London*** - -***5th Dec 2015*** +Check the Wiki for examples Made with 💖 by Dolan Miu 🍆 💦 😝 @@ -389,4 +353,4 @@ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI [daviddm-image]: https://david-dm.org/dolanmiu/docx.svg?theme=shields.io [daviddm-url]: https://david-dm.org/dolanmiu/docx [snky-image]: https://snyk.io/test/github/dolanmiu/docx/badge.svg -[snky-url]: https://snyk.io/test/github/dolanmiu/docx \ No newline at end of file +[snky-url]: https://snyk.io/test/github/dolanmiu/docx