How to use editor in wordpress
There is a predefined function in wordpress to add editor anywhere in your code. use following code to display editor
<?php $settings = array( 'media_buttons' => false ,'editor_height' => '100' , 'editor_class'=>'class name', 'textarea_name' => 'your textarea name' ); wp_editor($value,$name, $settings ); ?>
for more info you can visit here