Open a Component canvas (Beta)
Open a Component canvas (Beta)
webflow.openCanvas(target)
Open a Component’s canvas or a page for editing in the Designer.
To specify the Component to open, pass one of the following objects:
ComponentComponentInstance- A component ID as a string
You can also open a page for editing by passing a Page object.
In this case, this method behaves the same as the webflow.switchPage() method.
Beta
These methods are in public beta and may change with future releases.
Syntax
Where OpenCanvasOptions is one of:
Parameters
target: One of the following values:
Returns
Promise<void>
A Promise that resolves when the canvas or page has opened.
Example
Error handling
The component canvas is only available in Design mode. Calling openCanvas() with a component ID or reference in Build mode throws an InvalidRequest error.