Editor

The UECI Editor Interface, root object of the host editor

Editor

Methods

async activateAnnotationTool(activateParams)

Activate Annotation Tool
Parameters:
Name Type Description
activateParams object optional. Since 23.11
Properties
Name Type Description
mode String "add" to add annotation only, "select" to select annotation only, "all" for both add and select. default: "add"
Returns:
- undefined
Since:
  • 22.11

async appInfo() → {AppInfo}

Get application info, including language
Returns:
AppInfo
Since:
  • 22.11

async appName() → {string}

Get application name
Returns:
string - e.g. 'ArtPro+', 'AdobeIllustrator'
Since:
  • 22.07

async currentDocument() → {Document}

Get current document
Returns:
Document - The current active document. If no document opened, return null.
Since:
  • 22.07

async currentWindow() → {Window}

Get current container window object
Returns:
Window
Since:
  • 22.11

async keychain(domain) → {Keychain}

Get Keychain object for SSO. By specifying the domain a domain specific keychain storage object is created. Domain is used to avoid mixing up token generated for different domains, e.g. 'esko.cloud' v.s. 'cloudi.city'.
Parameters:
Name Type Description
domain String Domain name optional. e.g. 'next.dev.cloudi.city'. If no domain is passed, it will use default production domain 'eu.esko.cloud'.
@since 24.03
Returns:
Keychain
Since:
  • 23.11

async onAnnotationCreated(annotation)

Notified when annotation created Override this function to get notified.
Parameters:
Name Type Description
annotation Annotation
Since:
  • 22.11

async onAnnotationCreated2(annotation, params)

Notified when annotation created Override this function to get notified.
Parameters:
Name Type Description
annotation Annotation
params object optional
Properties
Name Type Description
pageNumber int on which page the annotation is created
Since:
  • 23.07

async onAnnotationSelected(annotationID)

Notified when annotation is selected by the tool Override this function to get notified.
Parameters:
Name Type Description
annotationID String The annotation ID
Since:
  • 23.11

async onDocumentChanged()

Notified when document is opened/closed/switched in host application Override this function to get notified.
Since:
  • 22.07

async onDocumentPageBoxesChanged()

Notified when document page boxes changed Override this function to get notified.
Since:
  • 22.11

async onDocumentPageNumberChanged()

Notified when document page number changed Override this function to get notified.
Since:
  • 23.07

async openInBrowser(url)

open a URL in browser
Parameters:
Name Type Description
url String
Since:
  • 22.11

async showModal(modalParams)

Show a Modal dialog which content will be filled by a given URL
Parameters:
Name Type Description
modalParams ModalParams
Since:
  • 22.11

async storage() → {Storage}

Get the storage object for get/set key value pairs The storage is shared accross different applications on the same machine
Returns:
Storage
Since:
  • 22.11

async version() → {Version}

Get current version string of editor
Returns:
Version
Since:
  • 22.11

async versionString() → {string}

Get current version string of editor Typically this is Esko DeskPack product version, e.g. '22.07.103'
Returns:
string
Since:
  • 22.11

async writeFileBinary(data, defaultFileName) → {bool}

Write Binary as File, user will be prompted with a native file save dialog
Parameters:
Name Type Description
data Uint8Array file binary stream
defaultFileName string default file name which user can override
Returns:
bool - Whether file is written successfully
Since:
  • 24.03