Please tolerate me for asking such a question. All the answers I found are for Drupal 7. There is barely any talk on this issue for Drupal 8. I am a beginner in Drupal and I am not a programming oriented person. However, I am determined to find the solution to make this work.

It seems the most straight forward solution is to add the following line of setting:

CKEDITOR.config.allowedContent = true;

However, where should I add it in Drupal 8? There's no (ckeditor).config.js, as far as I can find within my Drupal's installation directories. How or where should I proceed? Does this matter need coding in order to achieve my goal in Drupal 8?

Many of the CSS classes and scripts embedded within the content are stripped off by the CKEditor either after saving or works in the initial save but are then stripped after editing the content the second time.

If you have the patient for someone like me, please help. Much appreciated! If I am tackling the problem in a completely wrong direction, please advise as well. Thank you!


It seems that the short answer is "no" in Drupal 8. You should ensure that your HTML is W3C compliant and changes to your code will be minimal.

  • In addition to being rude, this does not answer the question, it just says don't do what you need/want to do. Many attributes are still removed from w3c compliant code. Mar 15 at 17:27
  • 1
    apologies if you found this rude at all. was certainly not my intention.
    – aydow
    Mar 15 at 22:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.