From 3f81350213597cc8dd00a538efeb853517b8383c Mon Sep 17 00:00:00 2001 From: Fedik Date: Thu, 2 Jun 2022 18:19:02 +0300 Subject: [PATCH] Fix TinyMCE height for multiple editor instances --- .../tinymce/src/PluginTraits/DisplayTrait.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php b/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php index f879fd6704fd1..8ea116b8cd8c8 100644 --- a/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php +++ b/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php @@ -98,17 +98,17 @@ public function onDisplay( $options['tinyMCE'][$fieldName]['height'] = $height; } + // Set editor to readonly mode + if (!empty($params['readonly'])) + { + $options['tinyMCE'][$fieldName]['readonly'] = 1; + } + // The ext-buttons if (empty($options['tinyMCE'][$fieldName]['joomlaExtButtons'])) { $btns = $this->tinyButtons($id, $buttons); - // Set editor to readonly mode - if (!empty($params['readonly'])) - { - $options['tinyMCE'][$fieldName]['readonly'] = 1; - } - $options['tinyMCE'][$fieldName]['joomlaMergeDefaults'] = true; $options['tinyMCE'][$fieldName]['joomlaExtButtons'] = $btns; }