Skip to content

Commit

Permalink
Allow style tag in the editor
Browse files Browse the repository at this point in the history
  • Loading branch information
ihorvansach committed Nov 5, 2019
1 parent 10f8b1a commit 6724336
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Plugin/Magento/Ui/Component/Wysiwyg/ConfigPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public function afterGetConfig(
\Magento\Ui\Component\Wysiwyg\ConfigInterface $configInterface,
\Magento\Framework\DataObject $result
) {

if (!$this->activeEditor) {
return $result;
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6724336

Please sign in to comment.