Skip to content

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 ​

PropertyTypeDefault valueDescription
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.
editorOptionsEditorOptions—Options for the variant and print option selection. If you leave it out, the script uses 'None' for both selections.
openModeOpenMode—What the editor opens.
printJobArgPrintJob—The print job to create, edit or view. Pass an empty object ({}) for OpenGallery and OpenUpload.

Czech Republic – The Country for the FutureFunded by the European Union – NextGenerationEUThe project was implemented within the The Country for the Future programme of the Ministry of Industry and Trade and co-financed by the European Union under NextGenerationEU.Support · Examples

Czech Republic – The Country for the FutureFunded by the European Union – NextGenerationEUThe project was implemented within the The Country for the Future programme of the Ministry of Industry and Trade and co-financed by the European Union under NextGenerationEU.Support · Examples