I'm trying to display to users an editor in the front end of my website (in a logged in area)
I have:
// IMPORT EDITOR CLASS
jimport( 'joomla.html.editor' );
// GET EDITOR SELECTED IN GLOBAL SETTINGS
$config = JFactory::getConfig();
$global_editor = $config->get( 'editor' );
// GET USER'S DEFAULT EDITOR
$user_editor = JFactory::getUser()->getParam("editor");
$stuff = JFactory::getUser()->getParam("editor");
if($user_editor && $user_editor !== 'JEditor') {
$selected_editor = $user_editor;
} else {
$selected_editor = $global_editor;
}
// INSTANTIATE THE EDITOR
$editor = JEditor::getInstance($selected_editor);
// SET EDITOR PARAMS
$params = array( 'smilies'=> '0' ,
'style' => '1' ,
'layer' => '0' ,
'table' => '0' ,
'clear_entities'=>'0'
);
// DISPLAY THE EDITOR (name, html, width, height, columns, rows, bottom buttons, id, asset, author, params)
echo $editor->display('editMain', '', '75%', '400', '20', '20', 'true', null, null, null, $params);
But no matter what I do the buttons won't show on load. Instead you need to click Toggle editor to get them to show. None of the other editors work so can't tell if it's just tinymce.
thanks