Commit 38a1132e by Edgar HIPP

Update imagemodule for new module-api

parent 54016475
DocXTemplater=require('docxtemplater')
XmlTemplater=require('docxtemplater').XmlTemplater
vm=require('vm')
JSZip=require('jszip')
......@@ -18,7 +18,8 @@ module.exports= class DocxQrCode
@qr.callback= () ->
_this.ready= true
_this.result= @result
testdoc= new _this.xmlTemplater.currentClass @result,
testdoc= new XmlTemplater @result,
fileTypeConfig:_this.xmlTemplater.fileTypeConfig
tags:_this.xmlTemplater.tags
Tags:_this.xmlTemplater.Tags
parser:_this.xmlTemplater.parser
......
......@@ -63,6 +63,7 @@ module.exports= class ImgReplacer
@qr[u].decode(@imageSetter)
catch e
console.error e
console.error e.stack
@imageSetter(mockedQrCode)
dat= png.decode(finished)
else
......
......@@ -44,7 +44,8 @@ class ImageModule
tag = templaterState.textInsideTag.substr(1)
tagValue = scopeManager.getValue(tag)
tagXml=@manager.getInstance('xmlTemplater').tagXml
xmlTemplater = @manager.getInstance('xmlTemplater')
tagXml=xmlTemplater.fileTypeConfig.tagsXmlArray[0]
tagXmlParagraph = tagXml.substr(0,1)+':p'
if @options.centered==false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment