We are not accepting new Applications for Print Partners.

onDesignClose

Registers a callback that runs when a user closes the Canva editor.

Usage

(async () => {
const api = await Canva.Partnership.initialize({
apiKey: "<partner_api_key>",
autoAuthToken: "<auto_auth_token>",
container: document.getElementById("container"),
});
const onDesignClose = () => {
// the user has closed the Canva editor
console.log("You closed the Canva editor!");
};
const onProductSelect = (opts) => {
api.createDesign({
...opts,
onDesignClose,
});
};
api.showCatalog({
onProductSelect,
});
})();
JAVASCRIPT