The Canva Button is only available for users in China. If your users aren't in China, you can't use the Canva Button. There are no plans to make the Canva Button available outside of China.

onDesignClose

API reference for the JavaScript API's onDesignClose method.

A function that runs when a user closes a design.

Usage

api.createDesign({
design: {
type: "Poster",
},
onDesignClose: () => {
// code goes here
},
});
JAVASCRIPT

You can pass the onDesignClose function into the createDesign and editDesign functions.

Parameters

This function doesn't receive any parameters.

Returns

void