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():

  1. Utilize the libraries API

          <?php
             elseif (file_exists(libraries_get_path('ckeditor') . '/ckeditor.js')) {
               $jspath=libraries_get_path('ckeditor') . '/ckeditor.js';
             }
          ?>
        
  2. 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.

CommentFileSizeAuthor
#2 profile_libraries-1783764-3.patch3.62 KBAnonymous (not verified)
#1 profile_libraries-1783764-2.patch3.62 KBAnonymous (not verified)

Comments

Anonymous’s picture

StatusFileSize
new3.62 KB

Here is the patch for 6.x-1.11

Anonymous’s picture

StatusFileSize
new3.62 KB

Oops, I returned ckeditor.js instead of the folder. Here it is fixed.

mkesicki’s picture

Status: Active » Needs review