For the browser find builds in `build/` directory.
For the browser find builds in `build/` directory.
Alternatively, you can create your own build from the sources:
```
npm run compile
npm run browserify
npm run uglify
```
Usage
Usage
=====
=====
To render an image, your **docx** or **pptx** template should contain the text: `{%image}`
To render an image, your **docx** or **pptx** template should contain the text: `{%image}`
...
@@ -68,6 +75,11 @@ Some notes regarding the template:
...
@@ -68,6 +75,11 @@ Some notes regarding the template:
Centering images
Centering images
================
================
You can center all images using either passing the option `opts.centered = true` or one by one using `{%%image}` instead of `{%image}` in your templates.
You can center all images by setting the global switch to true `opts.centered = true`.
If you would like to choose which images should be centered one by one:
* Set the global switch to false `opts.centered = false`.
* Use `{%image}` for images that shouldn't be centered.
* Use `{%%image}` for images that you would like to see centered.
In **pptx** generated documents, images are centered vertically and horizontally relative to the parent cell.
In **pptx** generated documents, images are centered vertically and horizontally relative to the parent cell.