From 367cf23d04b8bd3496c4dbbf2413408dbe9f294c Mon Sep 17 00:00:00 2001 From: Will Ezell Date: Fri, 3 Jan 2020 18:15:06 -0500 Subject: [PATCH] Issue 17731 tinymce (#17786) * #17731 fixes switching issue * #17731 fixes switching issue --- .../html/portlet/ext/contentlet/field/edit_field_js.jsp | 9 ++++++--- .../ext/contentlet/field/tiny_mce_config_default.jsp | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dotCMS/src/main/webapp/html/portlet/ext/contentlet/field/edit_field_js.jsp b/dotCMS/src/main/webapp/html/portlet/ext/contentlet/field/edit_field_js.jsp index 47fa7f09abf8..fd5c24013030 100644 --- a/dotCMS/src/main/webapp/html/portlet/ext/contentlet/field/edit_field_js.jsp +++ b/dotCMS/src/main/webapp/html/portlet/ext/contentlet/field/edit_field_js.jsp @@ -359,12 +359,15 @@ var cmsfile=null; <%}%> <%}%> <%}%> - console.log(textAreaId + "tinyPropOverride", eval(textAreaId + "tinyPropOverride")); - + let tinyConf = eval(textAreaId + "tinyPropOverride"); + if(tinyConf.plugins != undefined && tinyConf.plugins[2] != undefined){ + tinyConf.plugins[2]=tinyConf.plugins[2].replace("compat3x",""); + } + console.log(textAreaId, tinyConf ); //Enabling the wysiwyg try { - var wellTinyMCE = new tinymce.Editor(textAreaId, eval(textAreaId + "tinyPropOverride"), tinymce.EditorManager); + var wellTinyMCE = new tinymce.Editor(textAreaId, tinyConf, tinymce.EditorManager); wellTinyMCE.render(); wellTinyMCE.on('change', emmitFieldDataChange); } diff --git a/dotCMS/src/main/webapp/html/portlet/ext/contentlet/field/tiny_mce_config_default.jsp b/dotCMS/src/main/webapp/html/portlet/ext/contentlet/field/tiny_mce_config_default.jsp index 4cb1cb4e6d4c..5ae4565e9401 100644 --- a/dotCMS/src/main/webapp/html/portlet/ext/contentlet/field/tiny_mce_config_default.jsp +++ b/dotCMS/src/main/webapp/html/portlet/ext/contentlet/field/tiny_mce_config_default.jsp @@ -26,12 +26,12 @@ var tinyMCEProps = { theme: "modern", selector: "textarea", menubar: 'false', - statusbar: true, + statusbar: false, resize: "true", plugins: [ "advlist anchor autolink lists link image charmap print hr anchor ", "searchreplace wordcount visualchars fullscreen ", - "emoticons paste textcolor colorpicker textpattern validation dotimageclipboard compat3x" + "emoticons paste textcolor colorpicker textpattern validation dotimageclipboard" ], block_formats: 'Paragraph=p;Header 1=h1;Header 2=h2;Header 3=h3;Header 4=h4;Header 5=h5;Pre=pre;Code=code;Remove Format=removeformat',