Skip to content Skip to sidebar Skip to footer

Ckeditor Allowedcontent Behaving Oddly

Im trying to limit the html editing behavior of CKEditor when switching between source and wysiwyg mode. Currently when I switch from source to wysiwyg the editor removes any attr

Solution 1:

That's because style and class attributes are not handled by Advanced Content Filter as other attributes - they have their specific format in Allowed Content Rules. You can find a detailed description of ACRs in Allowed Content Rules guide. But in short - to allow all attributes, styles and classes you need to set:

allowedContent:'span[*]{*}(*)'

PS. If you set allowedContent = true correctly, then your spans wouldn't be filtered at all.

Post a Comment for "Ckeditor Allowedcontent Behaving Oddly"