CKEditor + KFM is a wonderful combination and it would be nice if it worked out of the box. It doesn't.

http://kfm.verens.com/Documentation/Installation/Using-KFM-as-a-plugin-f... states:

Linking KFM to CKeditor is very easy. Load up your CKeditor instance as usual, but add a filebrowserBrowseUrl parameter pointing to your KFM instance:

  CKEDITOR.replace( 'textarea_name',{
    filebrowserBrowseUrl: "/javascript/your-kfm-copy/"
  });

However, I can't figure out where to put this code to make it work with Drupal + CKEditor + KFM -- I'm sure I'm missing something, but I've spent too many hours on it.

My final "solution" was to hack ckeditor.module, adding this around line 744:

    // hack to use ckeditor with kfm...
    $filebrowser = 'kfm';
    switch ($filebrowser) {
      case 'kfm':
        // assumes kfm has been extracted inside of modules/ckeditor
        $settings[$textarea_id]['filebrowserBrowseUrl'] = $module_full_path . "/kfm/";
        break;

Proper support for kfm would be very appreciated!

Comments

dczepierga’s picture

I think we could add this in 1.3 release of CKEditor.

dczepierga’s picture

Status: Active » Postponed
Crusher’s picture

Assigned: Unassigned » Crusher

Hi, here is my working configuration:

- drupal 6.20
- Modul: CKEditor 6.x-1.2
- CKEditor 3.5
- KFM v1.4.7

Just install the CKEidtor modul and copy all files and folders of the CKEditor release to "ckeditor/ckeditor/"

Make a kfm folder inside /files/all/modules/ckeditor/plugins/.
File to edit is /files/all/modules/ckeditor/ckeditor.config.cs
Paste at the end but before };

  config.filebrowserBrowseUrl = 'sites/all/modules/ckeditor/plugins/kfm/';
 	config.filebrowserImageBrowseUrl = 'sites/all/modules/ckeditor/plugins/kfm/'; 	
};

Your drupal files and folders must be found under /.

Finish.
I am using Web Filemanager, too. It is set and enabled under ckeditor role config. But "config.filebrowserBrowseUrl" overwrites these settings and everything works fine.
If another filemangaer is enabled in ckeditor config, add link will not work. I disabled all other fm in ckeditor config and now kfm appears immediately.
You have to set up start folder etc. in kfm. Please have a look into documentation.

dczepierga’s picture

Assigned: Crusher » Unassigned
Status: Postponed » Closed (won't fix)
Issue tags: -6.x-1.3

I don't see any reason to add support for KFM... it doesn't have module in Drupal to configure it - if someone write module to manage KFM, then we could start to think about this.

Greetings