EditingExtensionClient.API
Provides methods for interacting with Canva.

Usage

1
// Initialize the client (this returns a EditingExtensionClient.API object)
2
const canva = window.canva.init();
3
4
// The EditingExtensionClient.API object provides methods for interacting with Canva
5
canva.onReady(async () => {
6
console.log("The client is initialized!");
7
});
Copied!

Methods

Name
Description
create
Creates a control that can be rendered in the control panel.
exit
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.
onReady
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.
Copy link
Contents
Usage
Methods