getViewMode()

Gets the current view mode in the editor, which can be either 'DESKTOP' or ‘MOBILE’. This enables you to show different options in your settings panel depending on whether the user is viewing the desktop or mobile versions of their site.

Syntax

Copy

Parameters

This method does not take any parameters.

Returns

Promise<string>

The current view mode in the editor, which can be either 'DESKTOP' or ‘MOBILE’.

Example

Copy
Did this help?