Commit dbbc5041 by MaxRcd

Updated readme

parent 7af658c1
...@@ -10,7 +10,7 @@ Installation ...@@ -10,7 +10,7 @@ Installation
============= =============
You first need to install docxtemplater by following its [installation guide](https://docxtemplater.readthedocs.io/en/latest/installation.html). You first need to install docxtemplater by following its [installation guide](https://docxtemplater.readthedocs.io/en/latest/installation.html).
For Node.js install this package For Node.js install this package:
``` ```
npm install open-docxtemplater-image-module npm install open-docxtemplater-image-module
``` ```
...@@ -26,8 +26,7 @@ npm run uglify ...@@ -26,8 +26,7 @@ npm run uglify
Usage Usage
===== =====
To render an image, your **docx** or **pptx** template should contain the text: `{%image}` Assuming your **docx** or **pptx** template contains only the text `{%image}`:
```javascript ```javascript
//Node.js example //Node.js example
var ImageModule = require('open-docxtemplater-image-module'); var ImageModule = require('open-docxtemplater-image-module');
...@@ -69,7 +68,7 @@ var buffer = doc ...@@ -69,7 +68,7 @@ var buffer = doc
fs.writeFile("test.docx",buffer); fs.writeFile("test.docx",buffer);
``` ```
Some notes regarding the template: Some notes regarding templates:
* **docx** files: the placeholder `{%image}` must be in a dedicated paragraph. * **docx** files: the placeholder `{%image}` must be in a dedicated paragraph.
* **pptx** files: the placeholder `{%image}` must be in a dedicated text cell. * **pptx** files: the placeholder `{%image}` must be in a dedicated text cell.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment