0

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!

2 Answers 2

1

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.

2
  • 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. Commented Mar 15, 2021 at 17:27
  • 1
    apologies if you found this rude at all. was certainly not my intention.
    – aydow
    Commented Mar 15, 2021 at 22:35
0

You can use the CKEditor Custom Config module

This should enable a config area on the text format where you can add:

allowedContent = true

A snippet of how to use it here:

Drupal CKEditor 4 Module Overview

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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