How to create/use Joomla! editor? JFactory::getEditor()

Example (short version in J!3.x)

$default_value = JFactory::getApplication()->input->get('your_field_name','');
$editor = JFactory::getConfig()->get('editor');
$editor = JEditor::getInstance($editor);
echo $editor->display( 'your_field_name', $default_value, 250, 250, 20, 20);

In Joomla! 2.5 the parameters list for the display() function has been lengthened, so to use specific display parameters in 2.5:

$editor =& JFactory::getEditor();
$params = array( 'smilies'=> '0' , 'style'  => '1' , 'layer'  => '0' , 'table'  => '0' ,'clear_entities'=>'0' );
echo $editor->display( 'desc', '', '400', '400', '20', '20', false, null, null, null, $params );

Allow html code in JRequest