@travelhubx/docxtemplater-link-module-free
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • 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 @travelhubx/docxtemplater-link-module-free

Weekly Downloads

11

Version

1.4.0

License

MIT

Unpacked Size

343 kB

Total Files

20

Last publish

Collaborators

  • stoianlucian28
  • eturia-github-admin
  • carmen.ciucanu
  • epanfile