Add more examples

This commit is contained in:
Dolan Miu
2018-08-05 04:24:04 +01:00
parent f25ecd0743
commit 5de3dc802f

View File

@ -1,5 +1,7 @@
# Examples # Examples
> All examples can run independently and can be found in the `/demo` folder of the project
## Simple ## Simple
A simple hello world of the `docx` library: A simple hello world of the `docx` library:
@ -14,7 +16,7 @@ This example shows how to customise the look and feel of a document using JS con
[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo2.js ':include') [Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo2.js ':include')
Source: https://github.com/dolanmiu/docx/blob/master/demo/demo2.js *Source: https://github.com/dolanmiu/docx/blob/master/demo/demo2.js*
## Numbering ## Numbering
@ -23,7 +25,7 @@ This example shows many levels of numbering
[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo3.js ':include') [Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo3.js ':include')
Source: https://github.com/dolanmiu/docx/blob/master/demo/demo3.js *Source: https://github.com/dolanmiu/docx/blob/master/demo/demo3.js*
## Table ## Table
@ -31,4 +33,28 @@ Example of simple table
[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo4.js ':include') [Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo4.js ':include')
Source: https://github.com/dolanmiu/docx/blob/master/demo/demo4.js *Source: https://github.com/dolanmiu/docx/blob/master/demo/demo4.js*
## Images
Importing Images from file system path
[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo5.js ':include')
*Source: https://github.com/dolanmiu/docx/blob/master/demo/demo5.js*
## Margins
Example showing how to set custom margains
[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo6.js ':include')
*Source: https://github.com/dolanmiu/docx/blob/master/demo/demo6.js*
## Orientation
Example showing how to set the document to `landscape` or `portrait`
[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo7.js ':include')
*Source: https://github.com/dolanmiu/docx/blob/master/demo/demo7.js*