Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Import Settings

Marcel Kloubert edited this page Jan 13, 2019 · 3 revisions

Many settings support an importValues property, which, when defined, imports values to their properties from external values.

The following example, will import the buttonText and buttonTooltip values to the text and tooltip properties of the declared button.

{
    "ego.power-tools": {
        "buttons": [
            {
                "importValues": {
                    "text": "buttonText",
                    "tooltip": "buttonTooltip"
                },

                "action": {
                    "type": "script",
                    "script": "my_button.js"
                }
            }
        ],

        "values": {
            "buttonText": "My button",
            "buttonTooltip": {
                "type": "code",
                "code": " 'This is a tooltip' + ' for the button, generated by code' "
            }
        }
    }
}