// built-in
'smiley', 'woltlabAttachment', 'woltlabSuiteMedia'
],
- 'p' => 'text',
- 'td' => 'text',
-
- // not a valid tag, used for elements that are used to wrap text
- // content such as <p> or <td>, avoid duplicate declarations
- 'text' => [
- // text alignment
- 'text-center', 'text-justify', 'text-right',
-
- // text color
- '.woltlab-color-000000', '.woltlab-color-000080', '.woltlab-color-0000CD', '.woltlab-color-0000FF', '.woltlab-color-006400', '.woltlab-color-008000',
- '.woltlab-color-008080', '.woltlab-color-00FF00', '.woltlab-color-00FFFF', '.woltlab-color-2F4F4F', '.woltlab-color-40E0D0', '.woltlab-color-4B0082',
- '.woltlab-color-696969', '.woltlab-color-800000', '.woltlab-color-800080', '.woltlab-color-808080', '.woltlab-color-8B4513', '.woltlab-color-A52A2A',
- '.woltlab-color-A9A9A9', '.woltlab-color-ADD8E6', '.woltlab-color-AFEEEE', '.woltlab-color-B22222', '.woltlab-color-D3D3D3', '.woltlab-color-DAA520',
- '.woltlab-color-DDA0DD', '.woltlab-color-E6E6FA', '.woltlab-color-EE82EE', '.woltlab-color-F0F8FF', '.woltlab-color-F0FFF0', '.woltlab-color-F0FFFF',
- '.woltlab-color-FAEBD7', '.woltlab-color-FF0000', '.woltlab-color-FF8C00', '.woltlab-color-FFA07A', '.woltlab-color-FFA500', '.woltlab-color-FFD700',
- '.woltlab-color-FFF0F5', '.woltlab-color-FFFF00', '.woltlab-color-FFFFE0', '.woltlab-color-FFFFFF',
-
- // font size
- '.woltlab-size-8', '.woltlab-size-10', '.woltlab-size-12', '.woltlab-size-14', '.woltlab-size-18', '.woltlab-size-24', '.woltlab-size-36',
-
- // font family
- '.woltlab-font-arial', '.woltlab-font-comicSansMs', '.woltlab-font-courierNew', '.woltlab-font-georgia', '.woltlab-font-lucidaSansUnicode',
- '.woltlab-font-tahoma', '.woltlab-font-timesNewRoman', '.woltlab-font-trebuchetMs', '.woltlab-font-verdana'
- ]
+ 'p' => ['text-center', 'text-justify', 'text-right'],
+ 'td' => ['text-center', 'text-justify', 'text-right'],
+ 'woltlab-color' => [
+ 'woltlab-color-000000', 'woltlab-color-000080', 'woltlab-color-0000CD', 'woltlab-color-0000FF', 'woltlab-color-006400', 'woltlab-color-008000',
+ 'woltlab-color-008080', 'woltlab-color-00FF00', 'woltlab-color-00FFFF', 'woltlab-color-2F4F4F', 'woltlab-color-40E0D0', 'woltlab-color-4B0082',
+ 'woltlab-color-696969', 'woltlab-color-800000', 'woltlab-color-800080', 'woltlab-color-808080', 'woltlab-color-8B4513', 'woltlab-color-A52A2A',
+ 'woltlab-color-A9A9A9', 'woltlab-color-ADD8E6', 'woltlab-color-AFEEEE', 'woltlab-color-B22222', 'woltlab-color-D3D3D3', 'woltlab-color-DAA520',
+ 'woltlab-color-DDA0DD', 'woltlab-color-E6E6FA', 'woltlab-color-EE82EE', 'woltlab-color-F0F8FF', 'woltlab-color-F0FFF0', 'woltlab-color-F0FFFF',
+ 'woltlab-color-FAEBD7', 'woltlab-color-FF0000', 'woltlab-color-FF8C00', 'woltlab-color-FFA07A', 'woltlab-color-FFA500', 'woltlab-color-FFD700',
+ 'woltlab-color-FFF0F5', 'woltlab-color-FFFF00', 'woltlab-color-FFFFE0', 'woltlab-color-FFFFFF'
+ ],
+ 'woltlab-font' => [
+ 'woltlab-font-arial', 'woltlab-font-comicSansMs', 'woltlab-font-courierNew', 'woltlab-font-georgia', 'woltlab-font-lucidaSansUnicode',
+ 'woltlab-font-tahoma', 'woltlab-font-timesNewRoman', 'woltlab-font-trebuchetMs', 'woltlab-font-verdana'
+ ],
+ 'woltlab-size' => ['woltlab-size-8', 'woltlab-size-10', 'woltlab-size-12', 'woltlab-size-14', 'woltlab-size-18', 'woltlab-size-24', 'woltlab-size-36']
];
/**
if (isset(self::$allowedClassNames[$nodeName])) {
$classNames = explode(' ', $element->getAttribute('class'));
$classNames = array_filter($classNames, function ($className) use ($nodeName) {
- if (self::$allowedClassNames[$nodeName] === 'text') {
- return ($className && in_array($className, self::$allowedClassNames['text']));
- }
-
return ($className && in_array($className, self::$allowedClassNames[$nodeName]));
});