javascript - CKEditor - How to disallow a tag without any attributes? -


i have disabled styles font styles , therefore when pasting word, pastes span tags without attributes. why want disallow span tags have no attributes.

my config.disallowedcontent looks this

config.disallowedcontent = '*{font*}; h1 h2 h5 h6; table[cellspacing,cellpadding,summary]{width,height};script;*[on*];'; 

sample html unwanted span tags looks this

<ol>     <li>         string <span><span><span><span><span>string</span></span></span></span></span> string     </li> </ol> 

here see there lot of span without attributes. content had font styles , font styles got filtered, span tags remained.

anything else allowed, except span tags without attribute , what's mentioned in disallowedcontent.

this page describes how disallow content. doesn't explain how disallow tags without attributes.

i tried using config.allowedcontent in case since want else, i'll have manually allow else. that's not want.

any help, ideas appreciated.


Comments