availableAttachments Property

Description

This property defines the attachments that are available in the editor. This property is an array of attachment definition objects. Each of these objects contain two properties. An "id" property and a "label" property, The symbols defined in this property are used in conjunction with the addImageAttachmentSymbol and addDocumentAttachmentSymbol commands; see the executeCommand() method.

Setting of this property also accomplishes deletion of attachment symbols from the diagram. If an attachment symbol has been added to the diagram that is not in the array of available attachments it will be deleted.

Note — This property may be set only after the startup() method has been called. Failure to do so will result in an exception.

To set the value of this property, use the ESDWeb object's set method as illustrated below.

Example

editor = new ESDWeb(null, 'editorNode');

/* set other properties here */

editor.startup(...);

editor.set('availableAttachments', [
    {
        id: 'id1',
        label: 'Attachment One'
    },
    {
        id: 'id2',
        label: 'Attachment Two'
    }
]);