Have 2 different editors on the page. Using this code I'm showing 'Editor - None' and 'Editor - CodeMirror' on the same page:
foreach (array('none', 'codemirror') as $plugin)
{
$editor = \Joomla\CMS\Editor\Editor::getInstance($plugin);
echo $editor->display($plugin, $plugin, 500, 320, 70, 10, true);
}Two editors with the same amount of buttons
Buttons are duplicated on the second editor

Seems to be caused by these lines:
https://github.com/joomla/joomla-cms/blob/4.2-dev/libraries/src/Editor/Editor.php#L93-L104
Every time an editor is initialized the event listener is added. Might be an oversight because you won't notice this out of the box (I haven't found any page where the Joomla! CMS would present different editors).
| Labels |
Added:
No Code Attached Yet
|
||
| Title |
|
||||||
| Labels |
Added:
bug
|
||
@OctavianC @Fedik please test #39648
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-01-16 17:38:28 |
| Closed_By | ⇒ | Quy |
The probalem that getButtons is not an event, it is a callback. Original code:
joomla-cms/plugins/editors/codemirror/codemirror.php
Line 351 in 4d5e843
$this->_subjectis instance of Joomla\CMS\Editor class)I cannot find PR, but found it was changed in a commit e9c1efc