Template editor
The editor is the canonical way to build template schemas. It lets you:
- Upload a template image (PNG/JPG/PDF; PDFs are rasterized to PNG on ingest)
- Draw and configure text fields and image fields
- Preview renders using the real backend renderer
- Save templates directly to your library (no manual JSON upload flow)
Create a new template
- Open
/app/editor - Click Upload image and pick your template background
- Add fields:
- Add field: text field (Arabic shaping, RTL, fonts)
- Add image: image placeholder (square/circle)
- Configure fields in the right inspector
- Click Save
After saving:
- The editor shows the
template_id - The URL becomes
/app/editor?template_id=<id> - Future saves update only the schema
Edit an existing template
- Open
/app/templates - Click Edit on a template
- Adjust fields and click Save
Note
Editing existing templates is schema-only. Background image replacement is disabled. To change the background image, create a new template.
Image fields (square/circle)
Image fields are placeholders you fill at render time by sending an images payload.
Field settings:
shape:squareorcirclefit:coverorcontain
Constraints:
- Image fields must be square (width == height). The editor enforces this automatically.
Render payload example:
json
{
"template_id": "<TEMPLATE_ID>",
"data": { "title": "مرحبًا" },
"images": { "avatar": "data:image/jpeg;base64,..." }
}
Preview
Use Preview to render and inspect output. Preview uses inline render mode under the hood and sets missing_key_policy="empty" so missing images don't error during quick iteration.