CKEditor can easily allow other modules to add custom file browsers that can be assigned in the profile settings, just by adding 3 lines in ckeditor.lib.inc:

  $settings['filebrowserBrowseUrl'] = $filebrowser; // New Line
  switch ($filebrowser) {
  if ($filebrowser_image != $filebrowser) {
    $settings['filebrowserImageBrowseUrl'] = $filebrowser_image; // New line
  if ($filebrowser_flash != $filebrowser) {
    $settings['filebrowserFlashBrowseUrl'] = $filebrowser_flash; // New line

Once these changes are applied, an external custom module can now simply add the file browser path as an option in the profile form with hook_form_alter. For example:

function mymodule_form_ckeditor_admin_profile_form_alter(&$form, &$form_state, $form_id){
  // This adds a views based file selector as a file browser option for images in that can be activated in the profile form.
  $form['ckeditor_upload_settings']['filebrowser_image']['#options'][base_path().'viewsfileman/browser'] = 'Views Based'; 
}

Comments

jacmkno’s picture

PS. I had to permanently disable updates in ckeditor because of this missing feature. So I would be glad If someone could pay some attention to this issue.