restoreElement( )


Restores (shows) a widget element on the stage.

The restoreElement() function returns a Promise that is resolved when the element is restored. You can only restore elements that are part of the widget with which the panel is associated.

The element selector is a string with the hash symbol (#) followed by the ID of the item you want to select (for example, "#myElement"). To use this function on an inner (nested) widget, use getScopedWixEditor().

Method Declaration
Copy
function restoreElement(selector: string): Promise<void>;
Method Parameters
selectorstringRequired

An element selector.

JavaScript
import wixEditor from "wix-editor"; // ... wixEditor.restoreElement("#title");
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?