Get template HTML
get-template-htmlReturns the content of a template serialised as HTML.
Use this tool when:
You want to read or navigate the content of a template
You want to understand the structure of a template before editing it
The HTML uses semantic data-* attributes to represent fynk-specific nodes such as dynamic fields, party references, and signature blocks. Addressable nodes (paragraphs, headings, etc.) carry a data-uuid attribute that can be used to target individual nodes in subsequent operations.
Clause numbering is dynamic. Numbered clauses are ordered list nodes — <div data-list data-kind="ordered"> — that contain the clause text and, when nested, sub-clauses. Their computed
number is shown read-only via a data-number attribute (e.g. data-number="1.1."). Numbers are
never part of the text; do not treat them as editable content.
A cross-reference to a clause appears as <span data-section-ref data-uuid="...">, where data-uuid is
the data-uuid of the list node it points at. It is empty: what it renders is that clause's computed
number, so it follows the clause rather than stating a number of its own.
Dynamic fields (fill-in placeholders) appear inline as <span data-dynamic-field data-ref-uuid="...">, where data-ref-uuid is the field's ref_uuid (see get-template-info
include=["dynamic_fields"]). Signature blocks are grouped in a signature container —
<div data-signatures data-align="..."><span data-signature-block data-ref-uuid="..."></span></div> — where
each <span data-signature-block> points at one block by its ref_uuid (see get-template-info
include=["signature_blocks"]). Legacy content may still show a block outside any container, as
<div data-signature-block data-ref-uuid="...">; writing it back turns it into a container holding that
one block. Party references appear as <span data-party data-ref-uuid="..." data-format="name|reference|address|address:inline">, where data-format selects
what is rendered (name = the party's entity_name, reference = its reference name).
Images (<img data-image>), dynamic tables (<div data-dynamic-table>) and signing vote blocks
(<span data-signing-vote-block>) appear as empty reference tags. Their contents are held outside the
HTML and cannot be created or edited through it, so copy these tags over unchanged when rewriting the
template; dropping one removes the image or table from the template.
Text formatting - bold, colour, font, size, highlight - is stated inline, as the style of the tag carrying it. A block's layout is not: the margins, indent and line height a paragraph or heading is laid out with stay on the block itself, so the HTML says nothing about them.
A block's alignment is stated, as data-text-align on the paragraph, heading or list
node carrying it - left, center, right or justify - with a matching text-align style alongside it.
A block carrying neither is aligned left.
Only available for templates with a prosemirror_data content type. Returns an error for PDF templates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template_uuid | Yes | UUID of the template to render as HTML |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | No | The template content serialised as HTML. Fynk-specific nodes use data-* attributes (e.g. data-dynamic-field, data-party, data-signatures). Addressable nodes carry a data-uuid attribute. |