Disable full screen mode

Today I will show you how to disable Gutenberg editor fullscreen mode in WordPress 5.4. On March 31 WordPress 5.4 was released. And it is a major update in 2020. If you already updated with the new WordPress 5.4 then you will find that when you publish articles and pages, you will enter fullscreen editing mode by default.

Full-Screen Mode
Full screen mode

The menu display on the left shows too many menu options, which make the editing interface look messy, so the WordPress team decided to enter fullscreen editing mode by default. But this feature may not be friendly enough for some users, so let’s take a look at how to disable the fullscreen editing mode.

How To Disable Fullscreen Mode?

disable fullscreen mode WordPress
Disable full-screen mode

As shown in the figure above, to close the fullscreen editing mode, you can click the three-dot icon in the upper right corner on the editing interface, and then uncheck the “fullscreen mode”. Your choice will be saved in the browser data, that is, when you are still logged in with this browser and this user, you will not edit in full screen by default.

If you still want to switch to full-screen mode, just check the full-screen mode again.

Disable fullscreen mode always

But if you log in with another browser or another account, you will still find that the default is full-screen mode. Even you again open new writing it will be open full-screen mode. You still need to cancel the full-screen mode again. To solve this problem, you can add the following code to the current theme’s functions.php or your plugin file, and you can disable the full-screen mode always.

//Disable full screen mode
function jba_disable_editor_fullscreen_by_default() {
    if (is_admin()) { 
        $script = "jQuery( window ).load(function() { const isFullscreenMode = wp.data.select( 'core/edit-post' ).isFeatureActive( 'fullscreenMode' ); if ( isFullscreenMode ) { wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fullscreenMode' ); } });";
        wp_add_inline_script( 'wp-blocks', $script );
add_action( 'enqueue_block_editor_assets', 'jba_disable_editor_fullscreen_by_default' );

The above code can disable the full screen mode globally for the entire website background, and all users will take effect. Of course, each user can also manually switch to full screen mode in the editing interface. However, the default will be non-full screen mode.

Let users set whether to enable full-screen mode

However, if the website has multiple users or administrators, you want users to choose whether to enable the fullscreen mode by default. This can be achieved with the help of the Block editor Fullscreen Mode Control plugin.

You can install the plugin from Plugin>Add New. Or Directly download Blockeditor Fullscreen Mode Control from WordPress website.

Blockeditor Fullscreen Mode Control
Blockeditor Fullscreen Mode Control

After enabling the plugin, users can set whether to enable the Fullscreen mode. Go to Users>Your profile then set as your needs.

disable fullscreen mode WordPress
Enable full screen mode

This setting value is independent of each user. As long as this user is logged in, whether it is in a new browser or not, the settings here will be called to determine whether to enable fullscreen mode. Of course, the user can still manually switch to fullscreen mode or cancel the fullscreen mode in the editor interface, and the last selected mode will be saved to the user settings.

Well, choose the corresponding method according to your needs. Although WordPress 5.4 has come with many new features. It’s fully up to you. But you can disable fullscreen mode WordPress 5.4 with this tutorial. Happy learning.

Leave a Reply