Provides methods for interacting with Canva.
// Initialize the client (this returns a CanvaApiClient object)const canva = window.canva.init();​// The CanvaApiClient object provides methods for interacting with Canvacanva.onReady(async () => {console.log('The client is initialized!');});
Name | Description |
​ | Creates a control that can be rendered in the control panel. |
​ | Exits the user from the extension. |
​ | Registers a callback that runs when the user interacts with a control. |
​ | Registers a callback that runs when Canva requests the extension to update the user's image. |
​ | Registers a callback that runs when the layout of the iframe changes. |
​ | Registers a callback that runs when the user selects a preset. |
​ | Registers a callback that runs when Canva requests presets from an extension. |
​ | Registers a callback that runs when the extension has finished loading. |
​ | Registers a callback that runs when Canva emits a save request. |
​ | Registers a callback that runs when a user exits touch mode. |
​ | Registers a callback that runs when the size of the viewport changes. |
​ | Sends the user's image to a server for remote image processing. |
​ | Reports an error to Canva. |
​ | Displays a notification. |
​ | Shows or hides a loading spinner. |
​ | Enables or disables touch mode. |
​ | Renders controls in the side panel. |
​ | Updates the layout of the iframe that contains the user's image. |