Links

updateControlPanel

API reference for the "updateControlPanel" method.
Renders rich controls in the control panel.
Even if an extension doesn't render rich controls, it must always call the updateControlPanel method in the onReady callback. The only exception to this rule is when an editing extension supports simple presets.

Usage

const canva = window.canva.init();
canva.onReady(async (opts) => {
// Create an array of controls
const controls = [
canva.create("button", { id: "myButton", label: "My Button" }),
];
// Render the controls in the control panel
canva.updateControlPanel(controls);
});

Parameters

Name
Type
Required
Description
controls
array
Yes
The controls to render in the control panel.

Returns

void