I'm currently updating my component to work in Joomla 4, and I've run into an issue with editors. I previously used this:

$editor = JFactory::getEditor();
$editor->display('text', $this->item->text, '', '', '', '', false);

I've since updated to this based one what little I could find:

use Joomla\CMS\Editor\Editor;
use Joomla\CMS\Factory;

$user = Factory::getUser();
$editor = Editor::getInstance($user->getParam('editor', Factory::getConfig()->get('editor')));
$editor->display('text', $this->item->text, '', '', '', '', false);

I'm fully unaware of what I'm doing wrong, but the end result is I have the desired editor with a second editor nested inside. nested editors

1 Answer 1


Accidentally stumbled upon the answer. I hadn't realized that a parent div used the same id="text", and I guess that the script for loading the editor just grabbed the first id it saw that matched.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.