Maybe I'm doing something wrong?

Thanks ahead of time for the quick answer,

CarbonPig

CommentFileSizeAuthor
#5 681584_ckeditor_support.patch930 byteswwalc

Comments

hutch’s picture

Using the WYSIWYG module in combination with FckEditor works for me.

CarbonPig’s picture

Sorry, but I'm not asking about FckEditor. I was asking about ckeditor http://drupal.org/project/ckeditor

Thanks,

CP

bryancasler’s picture

Subscribe

hutch’s picture

Imagepicker does not support Ckeditor at the moment, in order to provide support you would need the the following information:

  • How to detect wether Ckeditor is active
  • The id of the textarea box that Ckeditor uses for the editing area, so that imagepicker will know where to insert or which command Ckeditor uses to do the insert

These would then have to be added to imagepicker_iframe.js. See the section lines 160-190 for how some other wysiwyg editors do it.

Perhaps a request for help on the Ckeditor issue queue, someone there should have the answers.

wwalc’s picture

Status: Active » Needs review
StatusFileSize
new930 bytes

This patch will work only with CVS version of CKEditor module (with the dev release since tomorrow) - I have added a function that should help other developers insert HTML content into CKEditor when CKEditor module is enabled: Drupal.ckeditorInsertHtml.

hutch’s picture

I have added the patch to imagepicker CVS. This should appear as latest development version by tomorrow.
Thanks for the patch!

CarbonPig’s picture

Can the patch be applied to another version if someone doesn't use CVS?

Please excuse my level of understanding when it comes to CVS.

Thanks,

CP

klonos’s picture

will check it out and report back (soon as it gets into the latest dev version).

...subscribing.

hutch’s picture

The patch has been applied in the current development version, here
imagepicker_iframe.js was up until recently inline, in a function called imagepicker_js(). You could add the section manually there, just below the section that tests for win.FCKeditorAPI. This is circa line 953 in imagepicker.module in version 6.x-2.5
Here is the code for those who can't/won't use patch

if (win.Drupal.ckeditorInstance && win.Drupal.ckeditorInsertHtml) {
  if (win.Drupal.ckeditorInsertHtml(imgpInsertion)) {
    jobdone = true;
  }
  else
    return;
}
wwalc’s picture

Category: support » feature
Status: Needs review » Fixed

@anyone - just make sure you're running the latest dev release of CKEditor module. Drupal.ckeditorInsertHtml function is not available in CKEditor module 6.x-1.0 (will be available in 6.x-1.1). In case of any troubles feel free to create another issue in Image Picker or CKEditor issue tracker.

@hutch - thanks for committing it so quickly!

Setting as fixed, because the patch was committed to CVS.

hutch’s picture

I went ahead and committed it altough it is not yet tested. I reckon it will work ;-)
I'll test it myself if I get the chance to install CKeditor somewhere.

@wwalc, thanks for coming up with such an excellent fix.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.