config.contentsCss defined in custom config file is ignored. However, it works when put in the Profile -> Custom JavaScript configuration text area.

Other config parameters like config.height works just fine so it must be caused by the module. Please review processing order of this param and ideally let it be set from a file at least when 'CKEditor default' option is set or introduce a new one like 'Use setting from a config file'.

Thanks.

Comments

altavis’s picture

djwasserman’s picture

I came across this same problem and used the following workaround:

function MYTHEME_wysiwyg_editor_settings_alter(&$settings, $context) {
  $settings['contentsCss'][] = '/path/to/theme/files.css';
}
akalata’s picture

Note that the workaround in #2 only works if you are using the CKEditor library with the WYSIWYG module, NOT when using the CKEditor module.

jonloh’s picture

Similar with the ckeditor module, you can do the following in your custom module:

/**
 * Implements hook_ckeditor_settings_alter().
 */
function MYMODULE_ckeditor_settings_alter(&$settings, $conf) {
  global $base_path;

  // Add custom CSS file.
  $settings['contentsCss'][] = $base_path . drupal_get_path('module', 'MYMODULE') . '/MYMODULE.css';
}