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.

onDesignOpen

API reference for the JavaScript API's onDesignOpen method.

A function that runs when a user opens a design. This includes when a user creates a new design or edits an existing design.

Usage

api.createDesign({
design: {
type: "Poster",
},
onDesignOpen: (opts) => {
console.log(opts);
},
});
JAVASCRIPT

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

Parameters

Name
Type
Required
Description
opts
object
Yes
Parameters that Canva passes into the function.
opts.designId
string
Yes
The ID of the user's design.
opts.designTitle
string
Yes
The title of the user's design.

Returns

void