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.

api.createDesign({
design: {
type: "Poster",
},
onDesignOpen: (opts) => {
console.log(opts);
},
});
javascript
NameTypeRequiredDescription
optsobjectYesParameters that Canva passes into the function.
opts.designIdstringYesThe ID of the user's design.
opts.designTitlestringYesThe title of the user's design.

void