# Turn Off Fullscreen Mode in the Block Editor

> Opens the block editor with the admin menu and toolbar visible instead of in fullscreen mode, for every user.

- Type: PHP
- Runs: Admin only
- Category: [Block Editor](https://wpide.com/library/category/gutenberg/)
- Tags: block-editor, fullscreen, preferences
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/disable-editor-fullscreen-mode/

## Code

```php
add_action( 'enqueue_block_editor_assets', function () {
    $script = "wp.domReady(function(){var d=wp.data;if(d.dispatch('core/preferences')){d.dispatch('core/preferences').set('core/edit-post','fullscreenMode',false);}else if(d.select('core/edit-post')&&d.select('core/edit-post').isFeatureActive('fullscreenMode')){d.dispatch('core/edit-post').toggleFeature('fullscreenMode');}});";

    wp_add_inline_script( 'wp-edit-post', $script );
} );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Turn Off Fullscreen Mode in the Block Editor" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
