Problems with wp_editor in plugin admin page

admin

Administrator
Staff member
I am trying to add the wordpress editor to the admin page of a plugin I am building using this code:

Code:
$editor_id = "mailbody";
$content = "hello";
$settings = array( 'textarea_name' => 'mailbody' );

wp_editor( $content, $editor_id, $settings );

While the code is returning a instance of the editor to the plugin admin page non of the buttons are showing, the tabs are not working & media buttons are not working.
In the console I get the error: Uncaught ReferenceError: switchEditors is not defined, when clicking on the visual/text tabs.

Any ideas to where I am going wrong?