Sometimes users copy and paste text from different sources to CKEditor, but I want to restrict what tags they can copy to CKEditor.
I only need to u
To add my input, there is since 4.1 the Advanced Content Filter feature, which allows for very specific rules for allowed content (what tags and which styles/attributes/classes for them). I find it very powerful and very nice to configure.
Read more at http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter but here's a few examples from the page
config.allowedContent = true; // to allow all
// A rule accepting and
elements with optional "left" and "right" classes.
// Note: Both elements may contain these classes, not only .
config.allowedContent = "p h1(left,right)";
// Rules allowing:
// *
and
elements with an optional "text-align" style,
// * with a required "href" attribute,
// * and elements,
// * with an optional "tip" class (so
element may contain
// a "text-align" style and a "tip" class at the same time).
config.allowedContent = "p h1{text-align}; a[!href]; strong em; p(tip)";