Generate a Word document in JavaScript with Docx.js?

This code can't work on a JSFiddle because of the ajaxCalls to local files (everything that is in the blankfolder), or you should enter all files in ByteArray format and use the jsFiddle echo API: http://doc.jsfiddle.net/use/echo.html


You can generate a Docx Document from a template using docxtemplater (library I have created).

It can replace tags by their values (like a template engine), and also replace images in a paid version.

Here is a demo of the templating engine: https://docxtemplater.com/demo/