on-enable

On This Page

    If you want your users to know how to use your Power-Up, you should use the on-enable capability. This capability gets triggered when a user enables your Power-Up. You may want to use this capability to show your user how to use your Power-Up by opening a modal (using t.modal().

    Another example of when to use this capability is when you want to initiate a configuration or authentication flow immediately after the user enables your Power-Up.

    Not Guaranteed

    Your Power-Up is not guaranteed to have this capability called when it is enabled. This can happen for a few reasons:

    • Power-Up is enabled via the API, instead of board directory

    • Power-Up is enabled via the public Power-Up directory (https://trello.com/power-ups)

    Example Code

    1
    2
    window.TrelloPowerUp.initialize({
      'on-enable': function(t, options) {
        // This code will get triggered when a user enables your Power-Up
        return t.modal({
          url: './power-up-onboarding.html',
          height: 500,
          title: 'My Power-Up Overview'
        });
      }
    });
    

    Rate this page: