2.2.5 • Published 4 years ago

docx-template v2.2.5

Weekly downloads
30
License
GPL
Repository
github
Last release
4 years ago

docx-template

create personalized docx from docx template and data

supported variants following javascript language

any javascript expression

plain text form control's tag with pattern ${...} plain text form control's content with pattern ${...}

picture variable

picture form control's tag with expression pattern ${...}

if(...)with

richtext form control's tag with pattern if(...)with

for(;;)with

richtext form control's tag with pattern for(;;)with

sub document

  • dynamic: richtext form control's tag with pattern include(exp:subdoc url)
  • embed: richtext form control's tag with pattern include(), and content is embeded word ole object

import javascript code

richtext form control's tag with pattern script(...), and content is embeded javascript ole object

API

parse(template.docx)

return Promise, resolved with a VariantDocx with following api assemble({}/data/, {clearWrap=true/default clear sdt/}/option*/): return Promise resolved docx4js instance

Example

Todo

  • support javascript file for functions
  • inline subdoc

License

GPL

2.2.5

4 years ago

2.2.4

4 years ago

2.2.3

7 years ago

2.2.2

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.6

7 years ago

2.1.4

7 years ago

2.1.3

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

1.2.4

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.0

8 years ago