diff --git a/Plugin/Magento/Ui/Component/Wysiwyg/ConfigPlugin.php b/Plugin/Magento/Ui/Component/Wysiwyg/ConfigPlugin.php index b898883..043f45c 100644 --- a/Plugin/Magento/Ui/Component/Wysiwyg/ConfigPlugin.php +++ b/Plugin/Magento/Ui/Component/Wysiwyg/ConfigPlugin.php @@ -68,7 +68,6 @@ public function afterGetConfig( \Magento\Ui\Component\Wysiwyg\ConfigInterface $configInterface, \Magento\Framework\DataObject $result ) { - if (!$this->activeEditor) { return $result; } @@ -99,6 +98,9 @@ public function afterGetConfig( $settings['toolbar1'] = 'magentovariable magentowidget | formatselect | styleselect | fontsizeselect | 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'; $settings['force_p_newlines'] = false; + + $settings['valid_children'] = '+body[style]'; + $result->setData('settings', $settings); return $result; } else { // don't make any changes if the current wysiwyg editor is not tinymce 4