startup

startup Method

Description

Starts and shows the Web SDK editor. The startup method requires a single parameter: an object containing the properties to be set.

.startup(/* Object */ configuration)

Parameters

configuration Object

An object containing the following properties:

Remarks

This method starts and shows the Web SDK editor. The editor is inserted into the DOM node specified in the constructor of the ESDWeb object. This node must be in the DOM and visible before startup is called. Most editor methods are supported only after startup has been called. However, the defineTemplateAction method must be called before startup.

Example 1

editor = new window.__editor(undefined, document.getElementById('editor-node'));

editor.startup({
    serviceUrl: 'http://www.yourdomain.com/REST',
    licenseId: '===License ID===',
    features: ['GIS', 'STRUCTURES'],
    userId: 'sample-user-id',
    requestTimeout: 10 * 1000, // Set the request timeout (10 seconds)
    maxLogExceptions: 20,      // Set the maximum number of retained log exceptions
    beginZIndex: 50            // Set the z-index
});

If your application hosts the editor in a modal window, the call to startup must occur after the modal window is created and shown. When using the popular Twitter bootstrap library your code might look something like Example 2. Refer to the documentation for the library or toolkit you are using for more information.

Example 2

$('#myModal').on('shown.bs.modal', function (e) {
    editor.startup(configuration)
});