I've inherited some custom code running in Joomla 3.0.2 - we it's actually some standalone php/javascript that's run using Sourcerer (ie not a proper component).
I need it to display an rich-text editor, so I'm trying to use the standard editors which come with joomla. I've written some PHP based on this tutorial:
$document =& JFactory::getDocument();
$document->addScript('includes/js/joomla.javascript.js');
$editor =& JFactory::getEditor();
echo $editor->display('content', 'some content', '550', '400', '60', '20', false);
However all I get is a standard textarea without the toolbars. I've tried setting all pre-installed editors (CodeMirror, TinyMCE) to the default editor, plus I've tried the JCE and JoomlaCK plugins - all with the same result.
I guess the problem is that the code example is for an older version of Joomla, as includes/js/joomla.javascript.js doesn't exist. But I can't find an updated example anywhere... please help!