docxtemplater/es6/proof-state-module.js
2021-09-04 10:15:02 +05:00

19 lines
385 B
JavaScript

module.exports = {
on(eventName) {
if (eventName === "attached") {
this.attached = false;
}
},
postparse(postparsed, { filePath }) {
if (filePath !== "word/settings.xml") {
return null;
}
return postparsed.map(function (part) {
if (part.type === "tag" && part.tag === "w:proofState") {
return { type: "content", value: "" };
}
return part;
});
},
};