# Fullscreen

> Editor42 Fullscreen plugin: switches the editor between its normal size and a view that fills the browser window or the screen, keeping the scroll position.

Source: https://editor42.com/plugins/fullscreen  
Every page of editor42.com has a Markdown copy at its URL + `.md` (`index.md` after a URL that ends in `/`); all of them are in one file: https://editor42.com/llms-full.txt

Plugin alias: `fullscreen`

```js
editor42.init({
  plugins: 'fullscreen'
});
```

Toggles the editor between its normal embedded size and a fullscreen mode that fills the entire browser viewport. Supports both a CSS-based approach and native browser fullscreen via the Fullscreen API, with scroll position preservation.

## Options

| Option | Type | Default | Description |
|---|---|---|---|
| `fullscreen_native` | boolean | `false` | Use the browser's native Fullscreen API instead of CSS-based approach. |

## Commands

| Command | Description |
|---|---|
| `editor42FullScreen` | Toggles fullscreen on/off. |

## Toolbar buttons

| Name | Type | Description |
|---|---|---|
| `fullscreen` | Toggle button | Toggles fullscreen mode. |

## Menu items

| Name | Type | Description |
|---|---|---|
| `fullscreen` | Toggle menu item | Toggles fullscreen mode. |

## Events

| Event | Description |
|---|---|
| `FullscreenStateChanged` | Fired when fullscreen state changes. Payload: `{ state: boolean }`. |

## API

| Method | Description |
|---|---|
| `isFullscreen()` | Returns boolean indicating whether fullscreen is active. |

## Keyboard shortcuts

- `Ctrl+Shift+F` (Windows/Linux) / `Cmd+Shift+F` (macOS) — toggle fullscreen.
