Embedding
Form Builder JavaScript
Embed the SealRoute template builder with the <sealroute-builder> web component.
Requires an active license. Cross-origin parent pages must be listed in EMBED_ALLOWED_ORIGINS.
Mint a JWT (HS256) with the user's API key as the secret. Required claim: user_email. Optional: template_id, external_id, name, folder_name, document_urls, exp.
Example Code
Code
Mint a JWT
Code
Code
Or locally: rake embed:builder_token[email,template_id].
Attributes
| Attribute | Required | Description |
|---|---|---|
data-token | Yes | Builder JWT |
data-host | No | SealRoute origin (defaults from the script URL) |
data-height | No | Initial iframe min-height in px (default 800) |
data-with-title | No | Show builder title UI |
data-with-upload-button | No | Show upload control |
data-with-fields-detection | No | Enable field detection |
data-locale | No | UI locale |
Events
| Event | Description |
|---|---|
load | Builder loaded with template payload |
save | Template saved |
change | Template changed |
upload | Document uploaded |
Events are also available as postMessage types with the sealroute: prefix.
Last modified on