CKEDitor removes class names, even with the exception in config CKEditor seems to be stripping out class names when I toggle between HTML view and Rich Text view.

As per many suggestions across the web I have added the following to the config.js file:

config.allowedContent = true;


Uploaded, cleared cache and even gone to the JS file directly to check it is not caching on my machine, but it's still removing classes.

Is there another solution?
Go to "Admin >> Configuration >> CKEditor"; under Profiles, choose your profile (e.g. Full).

Edit that profile, and on "Advanced Options >> Custom JavaScript configuration" add config.allowedContent = true;.



Don't forget to flush the cache under "Performance tab."