@@ -94,8 +94,8 @@ public function afterGetConfig(
94
94
// Get current wysiwyg adapter's path
95
95
$ editor = $ this ->activeEditor ->getWysiwygAdapterPath ();
96
96
97
- // Is the current wysiwyg tinymce v4 or v5?
98
- if (strpos ($ editor , 'tinymce4Adapter ' ) || strpos ($ editor , 'tinymce5Adapter ' )) {
97
+ // Is the current wysiwyg tinymce v4 or v5 or v7 ?
98
+ if (strpos ($ editor , 'tinymce4Adapter ' ) || strpos ($ editor , 'tinymce5Adapter ' ) || strpos ( $ editor , ' tinymceAdapter ' ) ) {
99
99
100
100
if (($ result ->getDataByPath ('settings/menubar ' )) || ($ result ->getDataByPath ('settings/toolbar ' )) || ($ result ->getDataByPath ('settings/plugins ' ))) {
101
101
// do not override ui_element config (unsure if this is needed)
@@ -112,11 +112,16 @@ public function afterGetConfig(
112
112
$ settings ['menubar ' ] = true ;
113
113
$ settings ['image_advtab ' ] = true ;
114
114
115
- $ settings ['plugins ' ] = 'advlist autolink code colorpicker directionality hr imagetools link media noneditable paste print table textcolor toc visualchars anchor charmap codesample contextmenu help image insertdatetime lists nonbreaking pagebreak preview searchreplace template textpattern visualblocks wordcount magentovariable magentowidget emoticons ' ;
115
+ if (strpos ($ editor , 'tinymceAdapter ' )) {
116
+ $ settings ['plugins ' ] = 'advlist autolink code colorpicker directionality hr imagetools link media noneditable paste print table toc visualchars anchor charmap codesample contextmenu help image insertdatetime lists nonbreaking pagebreak preview searchreplace template textpattern visualblocks wordcount magentovariable magentowidget emoticons ' ;
117
+ $ settings ['toolbar1 ' ] = 'magentovariable magentowidget | blocks | styles | fontfamily | fontsize | lineheight | forecolor backcolor | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent ' ;
118
+ } else {
119
+ $ settings ['plugins ' ] = 'advlist autolink code colorpicker directionality hr imagetools link media noneditable paste print table textcolor toc visualchars anchor charmap codesample contextmenu help image insertdatetime lists nonbreaking pagebreak preview searchreplace template textpattern visualblocks wordcount magentovariable magentowidget emoticons ' ;
120
+ $ settings ['toolbar1 ' ] = 'magentovariable magentowidget | formatselect | styleselect | fontselect | fontsizeselect | lineheight | forecolor backcolor | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent ' ;
121
+ $ settings ['force_p_newlines ' ] = false ;
122
+ }
116
123
117
- $ settings ['toolbar1 ' ] = 'magentovariable magentowidget | formatselect | styleselect | fontselect | fontsizeselect | lineheight | forecolor backcolor | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent ' ;
118
124
$ settings ['toolbar2 ' ] = ' undo redo | link anchor table charmap | image media insertdatetime | widget | searchreplace visualblocks help | hr pagebreak | emoticons ' ;
119
- $ settings ['force_p_newlines ' ] = false ;
120
125
121
126
$ settings ['valid_children ' ] = '+body[style] ' ;
122
127
0 commit comments