Add dynamic HTML

How to add dynamic HTML to your template.

For this tutorial is recommended to have followed the Getting started tutorial.

We're gonna start with an empty document and the Docxmerge Add-in opened.

2019-10-01 21_03_56-Window.png

We're going to create a Rich Text Content Control, you can check this page if you don't know how.

2019-10-01 21_54_33-Window.png

It's important that the Title ends with HTML, in this case the title is example_HTML

We can then create the template in the Add-In.

2019-10-01 21_53_34-Window.png

The field example_HTML in the JSON will be encoded in Base64.

The default value is:

<html> <body> <p> This is html</p> </body> </html>

When we click Print, we will get a pdf like this:

2019-10-01 21_57_49-Window.png

Of course, you're encouraged to add anything you want in the HTML, tables, CSS. The only exception is you can't add Javascript.

To integrate the template in your application, you can check the Api Integration document.

Summary