diff --git a/media/editors/tinymce/js/tinymce.js b/media/editors/tinymce/js/tinymce.js index ebe616865e79e..3fb33a358727e 100644 --- a/media/editors/tinymce/js/tinymce.js +++ b/media/editors/tinymce/js/tinymce.js @@ -44,7 +44,7 @@ * @since 3.7.0 */ setupEditor: function ( element, pluginOptions ) { - var name = element ? element.getAttribute('name').replace(/\[\]|\]/g, '').split('[').pop() : 'default', // Get Editor name + var name = element ? element.getAttribute('name').replace(/[^A-Za-z0-9_]+/g, '_') : 'default', // Get Editor name tinyMCEOptions = pluginOptions ? pluginOptions.tinyMCE || {} : {}, defaultOptions = tinyMCEOptions['default'] || {}, options = tinyMCEOptions[name] ? tinyMCEOptions[name] : defaultOptions; // Check specific options by the name diff --git a/media/editors/tinymce/js/tinymce.min.js b/media/editors/tinymce/js/tinymce.min.js index 4dd636a871c7b..3299ad278558f 100644 --- a/media/editors/tinymce/js/tinymce.min.js +++ b/media/editors/tinymce/js/tinymce.min.js @@ -1 +1 @@ -!function(u,l,t,c){"use strict";t.getSize=t.getSize||function(){return{x:t.innerWidth,y:t.innerHeight}},t.jInsertEditorText=function(t,e){l.editors.instances[e].replaceSelection(t)};var e={setupEditors:function(t){t=t||c;for(var e=l.getOptions?l.getOptions("plg_editor_tinymce",{}):l.optionsStorage.plg_editor_tinymce||{},n=t.querySelectorAll(".js-editor-tinymce"),i=0,o=n.length;itinyButtons($id, $buttons); @@ -212,11 +211,11 @@ public function onDisplay( // Set editor to readonly mode if (!empty($params['readonly'])) { - $options['tinyMCE'][$fieldName]['readonly'] = 1; + $options['tinyMCE'][$parsedFieldName]['readonly'] = 1; } - $options['tinyMCE'][$fieldName]['joomlaMergeDefaults'] = true; - $options['tinyMCE'][$fieldName]['joomlaExtButtons'] = $btns; + $options['tinyMCE'][$parsedFieldName]['joomlaMergeDefaults'] = true; + $options['tinyMCE'][$parsedFieldName]['joomlaExtButtons'] = $btns; $doc->addScriptOptions('plg_editor_tinymce', $options, false); }