From c1c10268b245d6a40077f582796d4b60580d54d6 Mon Sep 17 00:00:00 2001 From: Edgar HIPP Date: Sat, 26 Nov 2016 18:16:10 +0100 Subject: [PATCH] Update main site --- .editorconfig | 5 +++++ examples/favicon.ico | Bin 0 -> 4286 bytes examples/index.mustache | 17 ++++++++++++----- 3 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 examples/favicon.ico diff --git a/.editorconfig b/.editorconfig index 1f62f555..3caeb590 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,6 +8,11 @@ insert_final_newline = true charset = utf-8 indent_style = tab +[*.mustache] +charset = utf-8 +indent_style = space +indent_size = 2 + [{.travis.yml,package.json}] indent_style = space indent_size = 2 diff --git a/examples/favicon.ico b/examples/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..1d042457207da6714c4bcbb146187761edfedd1b GIT binary patch literal 4286 zcmeI0T}TvB6vwCcKEzBjBSfJONkh_#wm^F@LlS8rg+2&;i88YcgajkW-PKj|GYd7h zRWy~XwcXM+8!0PtO+<2|g);5K9=5cyl3xDZJGH|MuI|j5?aR(`W)3rF&+nXj|M$+a z46}%Qf`b`)X0H1%j6cIL>xq$DObju4f3`#Ax0oe1;vwVM>J>}i33K%92{vVV`G0ih z9e?NgR}qa|O^8EB&RLjqb9lRbCIb~w;oO?3+OY*~Cy(>bgmKibON@uwf2q^;B}IRg z(VJi*yirRZ=wWHlLzlP*njk+er#3VQ)w^S1y<_B_3r|mLuHf>{txnl;^{-d%#fRbN zFspKBi(x~X5Dlx*fRc@CXT%D%CZ&I2e0%ya*d9JW^)7`dZ)@ry{P_BX=TE$U zhozI@r3qcs6yq^Ul+~<)8Cu-P+LA7-+0VXLc6H zU^N#+?3d;a6mJM|$)>sF_U{X_~5)7OD5)WAOahUb5?+tGYDMG|{HeEQv%BM0z# zY?NnHr?;#abj>>Ibai#Ne>%5aWNizNS45W;(Gil_^Xb1SMTt*u$9VkDsVTG_O_jxV zmwz!V6joC^&!&!@%){NR%mwGuaqlTmi`Zk&`f=-28U}8(K%bN#s|LCA-+V9`lOM-< z{;%n2v}dGoOjBk$23wm^5zbz~n}&he@4A6J&4x3m~} z680WB^G|d4mKKTF_L0}9CGQs&V3TU@V0DgA4M17SRU0^cVmMEsE_ zk5Ilj97Q2PTn*Ya0jP;pV0>thdl&TN=i$<}NN56mMKucRb;YNBUsEQ+(%66@!_66X zzc3#S`;(vvSVrE-@nB1eL@_Mck80v#+~#w&uJnQ0m61Btqy}ekb7{d<|H83a2;a;1 d{{E&KSO{%N$@y1*tV4$$xU#eTFYv$a{|2A|dfxy5 literal 0 HcmV?d00001 diff --git a/examples/index.mustache b/examples/index.mustache index b1512357..046f9771 100644 --- a/examples/index.mustache +++ b/examples/index.mustache @@ -7,6 +7,7 @@ + @@ -30,9 +31,11 @@ @@ -156,18 +159,21 @@

The best way to get docxtemplater is via npm

npm install docxtemplater --save
+

jszip version 2 is important !**, it won't work with version 3

+
npm install jszip@2 --save

Then create "input.docx" file containing "Hello {firstname} {lastname} !"

And create the following index.js file:

-
var fs=require('fs');
-Docxtemplater = require('docxtemplater');
+
var fs = require('fs');
+var Docxtemplater = require('docxtemplater');
+var JSZip = require('jszip');
 
-content = fs
+var content = fs
     .readFileSync(__dirname+"/input.docx","binary");
 
 var zip = new JSZip(content);
-var doc=new Docxtemplater().loadZip(zip)
+var doc = new Docxtemplater().loadZip(zip);
 
 doc.setData({
     "firstname":"John",
@@ -199,6 +205,7 @@ fs.writeFileSync(__dirname+"/output.docx",buf);
     

docxtemplater has comprehensive documentation available at https://docxtemplater.readthedocs.io/en/latest/

If you have some general questions / bugs to report, please use the github issue tracker.

I also provide professional support for companies with an SLA (My email address can be found on this site: https://github.com/edi9999)

+

You can also find ready-made pro modules at : https://modules.docxtemplater.com