Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docxtemplater

Package Overview
Dependencies
Maintainers
1
Versions
319
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docxtemplater - npm Package Versions

13
32

3.47.3

Diff

Changelog

Source

3.47.3

Improve getStructuredTags and getTags of the inspectModule to allow to get tags present in image attributes.

(This is to work together with the image-module 3.28.0)

edi9999
published 3.47.2 •

Changelog

Source

3.47.2

Bugfix internal api mechanism :

It internally allows to have multiple traits.expandToOne().

Fixes bugs with the subtemplate and subsection module.

Update moduleApiVersion to 3.40.0.

edi9999
published 3.47.1 •

Changelog

Source

3.47.1

If zip file is not a docx file, show the following error message now :

The filetype for this file could not be identified, is this file corrupted ? Zip file contains : world.txt,xxx.log

In previous versions, the following message was shown :

The filetype for this file could not be identified, is this file corrupted ?

edi9999
published 3.47.0 •

Changelog

Source

3.47.0

Make it possible to dynamically allow to use a given tag for a module.

For example, you can write :

const doc = new Docxtemplater(zip, {
  modules: [
    {
      optionsTransformer(options, doc) {
        doc.modules.forEach(function (module) {
          if (module.name === "RawXmlModule") {
            module.prefix = function (placeholderContent) {
              if (placeholderContent === "raw") {
                return "raw";
              }
              if (placeholderContent[0] === "@") {
                return placeholderContent.substr(1);
              }
            };
          }
        });
        return options;
      },
    },
  ],
});

This code means that if you write : {raw} in your document (without the "@" prefix), that tag will be used as a rawxml tag.

edi9999
published 3.46.2 •

Changelog

Source

3.46.2

Add "synced-zip" event that is run right after the zip is prepared.

Update moduleApiVersion to version 3.39.0, which is used by the latest subtemplate module.

edi9999
published 3.46.1 •

Changelog

Source

3.46.1

Fix typescript issue with TxtTemplater

edi9999
published 3.46.0 •

Changelog

Source

3.46.0

When using a loop inside a powerpoint table, if the result is an empty table, correctly drop the table from the presentation.

edi9999
published 3.45.1 •

Changelog

Source

3.45.1

Add getObjectIdentifiers to expressionParser, which can be used like this :

const expressionParser = require("docxtemplater/expressions.js");
expressionParser("a.b.c").getObjectIdentifiers();
// returns { a: { b: { c: {} } } }
edi9999
published 3.45.0 •

Changelog

Source

3.45.0

Bugfix for proofstate module : Following error was thrown when using this module :

Unnamed module

Now the module should work correctly

edi9999
published 3.44.0 •

Changelog

Source

3.44.0

Make it possible to configure the angular parser for just one docxtemplater instance.

(This needs angular-expressions version 1.2.0)

Use following code :

const expressionParser = require("docxtemplater/expressions.js");
new Docxtemplater(zip, {
  parser: expressionParser.configure({
    csp: true, // this disables the use of "new Function", useful for Vercel, Deno, ...
    filters: {
      uppercase: (input) => {
        if (typeof input === "string") {
          return input.toUpperCase();
        }
        return input;
      },
    },
  }),
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc