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
1

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
1
Was this helpful?
Yes
No