1
votes

Can you help in, i have a custom component in which the text area is displayed in joomla backend Code is

 <td height="25" valign="top"><?php echo JText::_( 'Long Description' ); ?>:</td>
 <td valign="top">
 <div id="clsTableTdPadd">  
 <textarea name="n_description" id="n_description" style="width:80%; height:400px" class="inputbox" >
 <?php echo stripcslashes($row->n_description);?></textarea></div></td>
 </div></td>

How to display Joomla default Editor (which is Tinymce by default) instead of text area in it

This is for Joomla 2.5 . Any help or suggestions pls

Further Edit Have made following changes basis comments

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

The editor is displaying, saving too. But when making edit - its not displaying in above

Edited Hello, the editor is only showing toggle editor button below underneath But when i went to see my articles in article manager - it showing all buttons like image, pagebreak, articles etc

How to show these tabs in my custom component too. Where i have put editor

Editor Buttn

1
Thanks Lodder, have made some changes with Joomla editor link as given. However - to my bad - i am still not able to get it done. Have appended the code in edit. Could you suggest a solution plsRuchika
Thanks Lodder for guiding too !!Ruchika

1 Answers

3
votes

You don't need to pass id, name ,class explicitly.

Just give some name as first argument it will set the id and name .

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