editDesign

API reference for the JavaScript API's editDesign method.

Opens an existing design in the Canva editor.

api.editDesign({
design: {
id: "DESIGN ID GOES HERE",
},
});
javascript
NameTypeRequiredDescription
optsobjectYesOptions for opening an existing design in the Canva editor.
opts.designobjectYesOptions for the user's design.
opts.design.idobjectYesThe ID of the user's design.
opts.editorobjectNoOptions for the Canva editor.
opts.editor.publishLabelstringNoA label for the Publish button. The default value is Publish.
opts.editor.fileTypestringNoA file type for the exported design. The accepted values include png, pdf, jpeg, and jpeg. The ability to export designs as mp4 and gif is an invite-only feature. The default value is png. If this argument is null, the editor uses whatever value is defined for the createDesign method.
opts.onDesignOpenfunctionNoA function that runs when a user opens their design. For more information, see onDesignOpen.
opts.onDesignPublishfunctionNoA function that runs when the user publishes their design. For more information, see onDesignPublish.
opts.onDesignClosefunctionNoA function that runs when the user closes their design. For more information, see onDesignClose.

void