Search.../

getScopedWixEditor( )

Gets the wix-editor module scoped of an inner (nested) widget.

Description

The getScopedWixEditor() function lets you use wix-editor functions on inner (nested) widgets. It receives a selector of an inner widget and returns a promise that resolves with an object representing the scope of the inner widget.

Authorization

Request

This endpoint does not take any parameters

Response Object

Fulfilled - The wix-editor module scoped to the nested widget.

Returns an empty object.

Status/Error Codes

Was this helpful?

Removes an element in an inner (nested) widget

Copy Code
1import wixEditor from 'wix-editor';
2
3// ...
4
5wixEditor.getScopedWixEditor("#nestedWidget1 #nestedWidget2") ////nestedWidget2 is inside nestedWidget1
6 .then(nestedWidget => {
7 nestedWidget.removeElement("#title1"); //removes title1 from nestedWidget2
8});