> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: getCurrentViewport() # Method package: wixEditor # Method menu location: wixEditor --> getCurrentViewport # Method Link: https://dev.wix.com/docs/velo/velo-only-apis/wix-editor/get-current-viewport.md # Method Description: Gets the viewport currently selected in the Editor. The `getCurrentViewport()` function returns a Promise that resolves to an object containing details about the currently selected viewport. To use this function on an inner (nested) widget, use [`getScopedWixEditor()`](#getScopedWixEditor). # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Get the current viewport ```javascript import wixEditor from 'wix-editor'; // ... wixEditor.getCurrentViewport() .then(viewport => { // Your code that uses the 'viewport' value goes here }); /* For example, `viewport` can be: { type: "DESKTOP", range: { minWidth: 1001, maxWidth: undefined } } */ ``` ---