Allow classes and ids in the new CKEditor
One of the first things I usually need to do when installing a new Drupal site, is to change the settings in the new (version>4) CKEditor so that I can type classes and ids and not have them strip out.
To do this, do the following:
- Go to Configuration -> CKEditor -> Full profile (or admin/config/content/ckeditor/edit/Full) or other profile that you use
- Under Advanced Options, in the field Custom Javascript configuration, type:
config.allowedContent = true;
This is caused by the new Advanced Content Filter in CKEditor 4.
Comments
You're doing it wrong. By doing that, you allow *everything*, including iframes, videos, scripts and whatnot. Surely that's not your intent?
Instead of setting allowedContent to "true", you should set it to "*(*)[id]" — this says "for all elements, accept all possible classes, and accept any ID attribute".
Thank you!
Add new comment