logo

CKEditor automatically strips classes from div in Drupal

22
April

CKEditor automatically strips classes from div in Drupal
By: Anonymous | Published On: Wed, 04/22/2020 - 22:13


Using CKEditor as a back end editor on my website. It is driving me round the bend though as it seems to want to change the code to how it sees fit whenever I press the source button.

Soln 1.
Follow this given step to resolve this issue.
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;.


Soln 2.
The easiest solution is going to the config.js and setting:
config.allowedContent = true;

 

Need Help ?