Spanish Total.js
English
Documentation For AI agents
Contents

Edit a template

Write the HTML of a template with a live preview.

.md GitHub
On this page

Click a template card, or choose Update template in its menu, to open the editor. The HTML is on the left and the preview, already inside the profile layout, is on the right. The preview changes while you type.

The template editor with the HTML of an invoice and its preview

Click SUBMIT to save the template. Cancel closes the editor without saving.

Preview with sample data

The preview fills the template with the sample model you put in a <script type="text/json"> block at the end of the template. In the example above, the model holds an invoice number, a customer and two items. Your apps send their own data when they render; the sample model only feeds the preview. See Template syntax.

Insert a date, a GUID or a file

Right-click in the HTML to open the editor menu.

The editor menu with Upload file, Insert current date and Insert GUID

  • Upload file: upload an image or another file and insert its address. See Images and files.
  • Insert current date: insert the current date and time, for example "2026-11-19T07:30:00.000Z".
  • Insert GUID: insert a random unique ID.
Made in Europe