Currently, the only libraries folder searched is /sites/all/libraries. However, installation profiles can also contain libraries, and I think the currently installed profile should be searched as well.
This can be done in a couple of ways in ckeditor.lib.inc _ckeditor_script_path():
-
Utilize the libraries API
<?php
elseif (file_exists(libraries_get_path('ckeditor') . '/ckeditor.js')) {
$jspath=libraries_get_path('ckeditor') . '/ckeditor.js';
}
?>
Use core's built in install_profile variable
<?php
$installed_profile = variable_get('install_profile', 'default');
$profile_path=drupal_get_path('profile', $installed_profile);
elseif (file_exists($profile_path . '/libraries/ckeditor/ckeditor.js')) {
$jspath=$profile_path . '/libraries/ckeditor/ckeditor.js';
}
?>
-
I like the first method, but that does introduce a dependency on another module. I will post a patch for the second method.
Comments
Comment #1
Anonymous (not verified) commentedHere is the patch for 6.x-1.11
Comment #2
Anonymous (not verified) commentedOops, I returned ckeditor.js instead of the folder. Here it is fixed.
Comment #3
mkesicki commented