ISingleButton Interface

A structure defining configuration of the Toolbox using the action property.

example

clientConfig.json The following two examples are equal and result in the same toolbar configuration.

"Toolbox": {
    "buttons": [
        {
            "translationKey": "Toolbox.TEXT",
            "translationKeyTitle": "Toolbox.TITLE_ADD_TEXT",
            "iconClass": "cc-icon-add-text",
            "buttons": [
                {
                    "translationKey": "Toolbox.ADD_TEXT",
                    "translationKeyTitle": "Toolbox.TITLE_ADD_TEXT",
                    "iconClass": "cc-icon-add-text",
                    "action": "Text"
                },
                {
                    "translationKey": "Toolbox.RICHTEXT",
                    "translationKeyTitle": "Toolbox.TITLE_ADD_RICHTEXT",
                    "iconClass": "cc-icon-rich-text",
                    "action": "RichText"
                }
            ]    
        },
        {
            "translationKey": "Toolbox.IMAGE",
            "translationKeyTitle": "Toolbox.TITLE_ADD_IMAGE",
            "iconClass": "cc-icon-add-image",
            "action": "Image"
        }
    ]
}

"Toolbox": {
    "buttons": [
        {
            "translationKey": "Toolbox.TEXT",
            "translationKeyTitle": "Toolbox.TITLE_ADD_TEXT",
            "iconClass": "cc-icon-add-text",
            "buttons": [
                "Text",
                "RichText"
            ]    
        },
        "Image"
    ]
}

Properties

action

action: ButtonAction

The action that the button performs. You can define the Toolbox by using the actions alone.

Optional iconClass

iconClass: string

The class of the button icon.

Optional itemConfig

A structure containing the configuration of new design elements. For an example, you can refer to ILocationDefaultConfig or IBarcodeDefaultConfig.

Optional translationKey

translationKey: string

The translation key of the button caption. The corresponding string should be defined in the ~\Configuration\translations.json file.

Optional translationKeyTitle

translationKeyTitle: string

The translation key of the button tooltip. The corresponding string should be defined in the ~\Configuration\translations.json file.