diff --git a/src/Field.php b/src/Field.php index 0367f2a..2f3632e 100644 --- a/src/Field.php +++ b/src/Field.php @@ -849,6 +849,18 @@ private function _adjustPurifierConfig(HTMLPurifier_Config $purifierConfig): HTM ]); } + if (in_array('numberedList', $ckeConfig->toolbar)) { + /** @var HTMLPurifier_HTMLDefinition|null $def */ + $def = $purifierConfig->getDefinition('HTML', true); + $def?->addAttribute('ol', 'style', 'Text'); + } + + if (in_array('bulletedList', $ckeConfig->toolbar)) { + /** @var HTMLPurifier_HTMLDefinition|null $def */ + $def = $purifierConfig->getDefinition('HTML', true); + $def?->addAttribute('ul', 'style', 'Text'); + } + return $purifierConfig; } }