I'm looking for HTML 4 compliance with CKEditor since we're using htmLawed on the back end to filter bad JS/CSS/HTML from getting into our database. So far, we've set up htmLawed to remove any HTML elements with the "style" attribute. This works perfectly for core styles and font size/color, as exemplified by my config here:
coreStyles_bold : { element: 'b' }, coreStyles_italic : { element: 'i' }, coreStyles_underline : { element: 'u' }, coreStyles_strike : { element: 'strike' }, fontSize_style : { element : 'font', attributes : { 'size': '#(size)' } }, colorButton_foreStyle : { element : 'font', attributes : { 'color': '#(color)' } }, colorButton_backStyle: { element : 'font', styles : { 'background-color': '#(color)' } }
The problem I'm having is with the indent. When I have a list element (such as "ul" or "ol") that I try to indent, CKEditor renders HTML as shown below, which is sent to the server. HtmLawed then strips out the style attribute from the ul element and renders the list as not indented when I display it on the front end.
<ul style="margin-left: 40px;"> <li>Some Text Here</li> </ul>
My question is...how do I prevent all elements from setting any kind of style attribute? I would like CKEditor to use pure HTML to do the formatting, as we're only allowing a limited set of formatting options. I would really like to see HTML produced by CKEditor that looks like this:
<ul> <ul> <li>Some Text Here</li> </ul> </ul>
Thanks!