Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In my project requirement was to load node specific styles. Used Code per node module to achieve this. Then on node edit the styles specific to the node added using CPN module should only get loaded in CKeditor styles dropdown.
Solution that I found,
function hook_ckeditor_settings_alter(&$settings, $conf) {
// Change the css path
$settings['contentsCss'][1] = '/sites/default/files/cpn/yourfilename.css';
}
Comments