I'm on 5.17.4 on drupal8 and civimail is working, html editing and all. But I don't know why. CKeditor loads and it's clearly not the drupal one (minimal), but it also doesn't fully match the editor config under Display Preferences. There are no console, server or civi log errors. It does take part of the preferences into account though; I can break the editor by choosing a skin or plugin that's not available.

The pressing problem is that the toolbar does not contain the link buttons and there appears to be filtering involved, so even in the source view, adding anchor elements manually, eventually just filters them out, replacing them with the tag's content. So no way to add html links.

So where is this third config coming from? Would this be the default CKEditor ships with and is somehow used instead of the civi provided one? What are the expected lookup paths?

EDIT: I can even use 'CKEditorCustomConfig' => "adasdada" in Resources.php and it changes nothing. I also tried hacking away what I found of ACF code in the drupal plugin part of CKEditor, but that didn't have an effect either.

  • Do you mean the editor for plain emails or the editor in the Mosaico email template tool?
    – tanbog
    Oct 22, 2019 at 2:27
  • I remember this happening on one site I was working on, it wouldn't take the settings here at /civicrm/admin/ckeditor into any consideration but then updating the module to the latest version and then clearing all caches seemed to help and I could make changes. Could you confirm whether the module is up to date just to eliminate it as a cause?
    – Jade
    Oct 22, 2019 at 15:15
  • vanilla editor, not Mosaico. And it's a new install, so everything should be up to date. Oct 22, 2019 at 20:08

2 Answers 2


You didn't mention the path to the config.js that you're editing, which I think will help people answer your question.

However, my guess is that you are installing Civi using the Roundearth plugin, because that would account for you having two different config.js files. I'm also guessing you're editing the file at <projectroot>/vendor/civicrm/civicrm-core/bower_components/ckeditor. There's a second config.js at <projectroot>/web/libraries/civicrm/bower_components/ckeditor. Hopefully this is enough to help you solve your problem.

  • Both config.js' have the "links" toolbar group item and nothing suspicious; moreover they're identical. crm-ckeditor-default.js that civi edits has an additional groups: [ 'links' ] submember, but adding that to the other two or removing it didn't change anything. And yes, I did install using civicrm-composer-plugin. Oct 24, 2019 at 12:30

With the help of the answer to How to disable or fix the wysiwyg editor on civimail I managed to get it to not strip links by adding this line to the config:

config.extraAllowedContent = 'html;head;body;span;ul;li;table;td;style;a;a[*];*[id];*(*);*{*}';

It's different from the linked answer in that it explicitly reallows a and all its attributes.

So while this provides a workaround to the problem, this file will get overwritten if I ever touch civi ckeditor settings and it's still not at all clear why this is needed in the first place. And more importantly, the toolbar is still missing the buttons.

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.