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