Disable WordPress visual editor without losing media upload and insertion support

Disabling the visual text editor in a users settings page or by the following code in your functions.php file may have an unintended consequence.

While it will remove the visual editor it also removes media upload capabalities (without removing the ‘add media’ button to boot!).

A way to work around this is to make the html editor the default shown and hide the editors tabs.

Add this to your functions.php file.

Add this to a css file which loads only in admin.

If you don’t already have a custom css file enqueued for admin add this to your functions.php file.

And you’re done!