Skip to content

Commit

Permalink
12062-TinyMCE-support-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanhrytsaim committed Oct 24, 2024
1 parent 29be320 commit 8661436
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Plugin/Magento/Ui/Component/Wysiwyg/ConfigPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ public function afterGetConfig(
$settings['menubar'] = true;
$settings['image_advtab'] = true;

$settings['toolbar1'] = 'magentovariable magentowidget | formatselect | styleselect | fontselect | fontsizeselect | lineheight | forecolor backcolor | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent';
$settings['toolbar2'] = ' undo redo | link anchor table charmap | image media insertdatetime | widget | searchreplace visualblocks help | hr pagebreak | emoticons';

if (strpos($editor, 'tinymceAdapter')) {
$settings['toolbar1'] = str_replace('formatselect | styleselect | fontselect | fontsizeselect','blocks | styles | fontfamily | fontsize', $settings['toolbar1']);
$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';
$settings['toolbar1'] = 'magentovariable magentowidget | blocks | styles | fontfamily | fontsize | lineheight | forecolor backcolor | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent';
} else {
$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';
$settings['toolbar1'] = 'magentovariable magentowidget | formatselect | styleselect | fontselect | fontsizeselect | lineheight | forecolor backcolor | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent';
$settings['force_p_newlines'] = false;
}

$settings['toolbar2'] = ' undo redo | link anchor table charmap | image media insertdatetime | widget | searchreplace visualblocks help | hr pagebreak | emoticons';

$settings['valid_children'] = '+body[style]';

$result->setData('settings', $settings);
Expand Down

0 comments on commit 8661436

Please sign in to comment.