You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CKEditor5 filters out any classes applied to HTML elements in the Source Mode. I created an HTML Purifier config to prevent this, but the classes still get stripped out upon saving an entry.
{
"HTML.Allowed": "ol[class],li"
}
Specifically, I'm trying to allow different classes to be applied to <ul> elements (e.g. class1, class2) without CKEditor5 stripping them out.
Additional info
Craft version: 4.5.3
PHP version: 8.0.13
Database driver & version: MariaDB 10.5.22
Plugins & versions: CKEditor 3.5.1
The text was updated successfully, but these errors were encountered:
CKEditor itself is probably the one stripping the classes. The only way CKEditor will allow classes to be added to ol/ul/li elements is via the Styles feature.
Note that to style lists, you will need to ensure your CKEditor config’s “List Plugin” setting is set to DocumentList.
Description
CKEditor5 filters out any classes applied to HTML elements in the Source Mode. I created an HTML Purifier config to prevent this, but the classes still get stripped out upon saving an entry.
Specifically, I'm trying to allow different classes to be applied to
<ul>
elements (e.g. class1, class2) without CKEditor5 stripping them out.Additional info
The text was updated successfully, but these errors were encountered: