Skip to content

Type Alias: DesignerEntityEvent<T = unknown> ​

ts
type DesignerEntityEvent<T = unknown> = object;

An event from the editor, passed to the callbacks registered with subscribeDesignerEvent() or with the data-td-*-callback attributes of the script tag.

Remarks ​

The events and their payload:

entityTypeeventTypeWhenentityGuiddetail
printJobcreatedA print job was saved in a Create session — by a Save / SaveAndClose button (each time), when a proofreading is generated (only before the first save), or by the final confirmation (if not saved before). Same GUID for the whole session.print job GUIDIPrintJobDto
printJobupdatedA print job opened with openMode: 'Edit' was saved (final confirmation, Save / SaveAndClose), or the final confirmation of a Create session after an earlier save. Generating a proofreading of an existing print job fires no event.print job GUIDIPrintJobDto
logocreatedThe user uploaded a new logo while designing.logo GUIDILogoDTO
logoupdatedThe user renamed a logo or added an edited logo to the gallery.logo GUIDnone
logodeletedThe user deleted a logo from the gallery.logo GUIDnone
logoselectedThe user selected or uploaded a logo in the OpenGallery / OpenUpload open mode.logo GUID{ logoGuid, logoUploaded }
logoselectedThe user cleared the selected logo in the OpenGallery / OpenUpload open mode.null{}
textcreatedThe user created a text in the editor, or changed an existing one.text object ID (GUID)ITextDTO
proofreadingcreatedA proofreading was generated.print job GUIDBlob with the PDF

For printJob events the script converts the editor's data to IPrintJobDto, including the URLs of the print job files. After a logo / selected event from the OpenGallery / OpenUpload open mode the script also sets the selected logo as the customer's logo (Customer.logoGuid).

See Events and callbacks.

Type Parameters ​

Type ParameterDefault typeDescription
TunknownType of DesignerEntityEvent.detail.

Properties ​

PropertyTypeDescription
detail?TData of the entity (see the table above).
entityGuidstringGUID of the entity (see the table above). At runtime it can be null (a cleared logo/selected), although the type says string.
entityTypeDesignerEntityTypeThe kind of entity.
eventTypeDesignerEventTypeWhat happened.

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