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

1
const canva = window.canva.init();
2
3
canva.onReady(async (opts) => {
4
// Create an array of controls
5
const controls = [
6
canva.create("button", { id: "myButton", label: "My Button" }),
7
];
8
9
// Render the controls in the control panel
10
canva.updateControlPanel(controls);
11
});
Copied!

Parameters

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

Returns

void
Copy link