docxtemplater-link-module-free

0.0.1 • Public • Published

Open Source docxtemplater link module

Installation

You first need to install docxtemplater by following its installation guide.

For Node.js install this package:

npm install docxtemplater-link-module-free

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

Assuming your docx template contains only the text {^link}:

var LinkModule = require("open-docxtemplater-link-module");
var linkModule = new LinkModule();

var zip = new JSZip(content);
var doc = new Docxtemplater()
  .attachModule(linkModule)
  .loadZip(zip)
  .setData({ link: "https://google.fr" })
  .render();

var buffer = doc.getZip().generate({ type: "nodebuffer" });

fs.writeFile("test.docx", buffer);

Package Sidebar

Install

npm i docxtemplater-link-module-free

Weekly Downloads

102

Version

0.0.1

License

MIT

Unpacked Size

322 kB

Total Files

16

Last publish

Collaborators

  • desa.eric