Type Alias: EditorArguments
ts
type EditorArguments = object;The editor arguments — the JSON object that tells the editor what to open and how to behave.
Remarks
Pass it to openDesigner(), put it as JSON into the data-td-options attribute, or let the builder create it.
See Editor arguments.
Example
Create a print job in Exact data mode
json
{
"openMode": "Create",
"dataMode": "Exact",
"editorOptions": { "showSelectedVariants": "None", "showSelectedPrintOptions": "None" },
"printJob": {
"addProducts": {
"supplierCode": "PFC",
"variants": [{ "productCode": "10086021", "quantity": 100 }]
},
"addPrintings": [{ "printPositionCode": "front", "printTechnologyCode": "PAD03" }],
"customer": { "orderCode": "ORD-1001", "orderItemCode": "1" },
"customProperties": { "cartItemId": "42" }
},
"editor": {
"result": {
"resultAction": "Dialog",
"redirectUrl": "https://shop.example.com/cart",
"closeDialog": [
{ "language": "en", "title": "Saved", "message": "Your design is saved.", "buttonText": "Go to cart" }
]
}
}
}Properties
| Property | Type | Default value | Description |
|---|---|---|---|
dataMode? | DataMode | 'Partial' (set by the editor when missing) | How the product data in ArgPrintJob.addProducts and ArgPrintJob.addPrintings are interpreted when the editor creates a print job. |
editor? | ArgEditor | — | Overrides of the editor behavior configured in the Admin Portal: result action, proofreading template, buttons. |
editorOptions | EditorOptions | — | Options for the variant and print option selection. If you leave it out, the script uses 'None' for both selections. |
openMode | OpenMode | — | What the editor opens. |
printJob | ArgPrintJob | — | The print job to create, edit or view. Pass an empty object ({}) for OpenGallery and OpenUpload. |