Customize the "Publish" button
When a user is ready to print their design, they can click the Publish button to start the proofing process. If you'd like to use different terminology for this button though, you can change the label.
To customize the label of the "Publish" button, provide a value for the publishLabel
property when using the following methods:
The following snippet demonstrates this customization in the createDesign
method:
(async () => {const api = await Canva.Partnership.initialize({apiKey: "<partner_api_key>",autoAuthToken: "<auto_auth_token>",container: document.getElementById("container"),});const onProductSelect = (opts) => {api.createDesign({ ...opts, publishLabel: "Do something!" });};api.showCatalog({onProductSelect,});})();
javascript