Demo Readme Changelog Buy error-location module Releases RSS

Summary (version 3.0.3)

This module makes it possible to locate errors

This module is available as part of the docxtemplater ENTREPRISE plan.

README

Error location Module

This module makes it possible to locate errors in a word/document.

Installation:

You will need docxtemplater v3: npm install docxtemplater

Install this module with npm install --save "$url"

Usage

const ErrorLocationModule = require("docxtemplater-error-location-module");
const errorModule = new ErrorLocationModule();
doc.attachModule(errorModule);
// Now all your errors will be enhanced with locationWord

Options

If you would like to change the author name and date of the comments, you can by using following code :

const errorModule = new ErrorLocationModule({
    author: "My author name",
    date: new Date(),
});

date takes a Date parameter as an input, and author a string

try {
    doc.compile();
}
catch (e) {
    errorModule.addComments();
    throw e;
}

Building

You can build the es6 into js by running npm run compile

Testing

You can test the module with npm test

CHANGELOG

3.0.3

Make error-location module work with comments even when the HTML module is attached

3.0.2

Commenter does not change file if there are no errors

3.0.1

Make it possible to overwrite author + date of the comments

3.0.0

Initial release

Edgar Hipp

I'm the creator of docxtemplater. I work on making docxtemplater great since 2013.