How to disable drag to resize option in WordPress editor

Okay, We want to remove the annoying line dividing the screen into two parts.


Just add this code in your functions.php

function custom_admin_script() {
    echo '<script>
        document.addEventListener("DOMContentLoaded", function () {
            function removeClassFromElements() {
                let elements = document.querySelectorAll("div.edit-post-meta-boxes-main");
                elements.forEach(el => {
                    el.classList.remove("edit-post-meta-boxes-main");
                });
            }
            removeClassFromElements();

            let observer = new MutationObserver((mutations) => {
                mutations.forEach(mutation => {
                    if (mutation.addedNodes.length) {
                        removeClassFromElements();
                    }
                });
            });

            observer.observe(document.body, { childList: true, subtree: true });
        });
    </script>
    <style>
	    .block-editor-iframe__scale-container {
	    	min-height: 1000px !important;
	    }
    </style>
    ';
}
add_action('admin_footer', 'custom_admin_script');

Using javascript we remove the class edit-post-meta-boxes-main
and then using css we add the style for the class block-editor-iframe__scale-container

//комментарии