Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
docxtemplater-image-module
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
npm
docxtemplater-image-module
Commits
38a1132e
Commit
38a1132e
authored
Jan 28, 2016
by
Edgar HIPP
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update imagemodule for new module-api
parent
54016475
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
coffee/docxQrCode.coffee
+3
-2
coffee/imgReplacer.coffee
+1
-0
coffee/index.coffee
+2
-1
No files found.
coffee/docxQrCode.coffee
View file @
38a1132e
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
...
...
coffee/imgReplacer.coffee
View file @
38a1132e
...
...
@@ -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
...
...
coffee/index.coffee
View file @
38a1132e
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment