The successor of FCKeditor is coming, over at the wysiwyg-module they already have support for it: #462146: Add editor: CKeditor

I did some research, but couldn't get it to work so far - maybe someone that actually knows what to do could help out.

These are my pointers:

  • the filebrowser and the popup-plugin must be enabled - you need to edit ckeditor.inc of the wysiwyg-module to do this
  • there is some discussion about it here: http://dev.fckeditor.net/ticket/3673
  • The Name of the URL-variable changed from ImageBrowserURL to filebrowserImageBrowseUrl

However CKeditor uses some kind of different model to add images to their URL field - I couldn't figure out how they do this: Its not working with the id of the url field anymore I guess. Its more closely related to their ckfinder-product.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AdrianB’s picture

Subscribing

that0n3guy’s picture

sub..

kant’s picture

Subscribing

timatlee’s picture

Subscribing

GrimSage’s picture

this would be awesome

jaxtheking’s picture

Yes, reaaaally needed. CKeditor seems the proper way to go in terms of ease of use for clients.

that0n3guy’s picture

I've noticed they have some more documentation up at:

http://docs.fckeditor.net/CKEditor_3.x/Developers_Guide/File_Browser_%28...

that0n3guy’s picture

Ok... so I messed around a little bit... did a couple very very simple changes to the imce_wysiwyg.module code. It almost works....

Add image and IMCE to the toolbar from wysiwyg profile settings.

You should then have in image button... push it... now click browse server. TADA it opens IMCE....

BUT, after you upload an image... it wont let you send the image back to ckeditor... it just opens it up on a new window/tab (in firefox).

If someone can figure out how to send it to ckeditor.. that would be awesome.

nhck’s picture

Actually it should be sufficient to just specify:

options' => array(
         'filebrowserBrowseUrl' => url('imce', array('query' => array('app' => $editor . '|url@txtUrl|width@txtWidth|height@txtHeight'))),

       ),

However, this: 'app' => $editor . '|url@txtUrl|width@txtWidth|height@txtHeight' isn't correct anymore for ckeditor. You need to send it to ckeditor somehow different:

Check modules/imce/js/imce_set_app.js.

nhck’s picture

The solution should be somewhere along these lines:

http://modxcms.com/forums/index.php?topic=39191.20

slosa’s picture

sub

Yas375’s picture

Version: 6.x-1.x-dev » 6.x-1.0
Status: Reviewed & tested by the community » Active
FileSize
2.57 KB

hi! I try to fix this problem and it works for me.

see readme.txt in attach for instructions.

If you know hot to do this work better - please notice me.

nhck’s picture

Status: Active » Reviewed & tested by the community
FileSize
2.13 KB

Nice going Yas375 I made this into a patch for you and for the maintainer to put out a new version.

Reassigning this to dev for test robot.
Btw: ckeditor now has officially replaced fckeditor (http://ckeditor.com/blog/CKEditor_3.0_is_here)

Reviewed and tested by me :-)

saerogy’s picture

Version: 6.x-1.x-dev » 6.x-1.0
Status: Reviewed & tested by the community » Active

It works for me, too. Thank you to both of that0n3guy and Yas375.

nhck’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Status: Active » Reviewed & tested by the community
Yas375’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Status: Active » Reviewed & tested by the community

2Niels Hackius: thanks for patch! =)

paulbeaney’s picture

Hi,

I have installed this patch but the "Send to ckeditor" button doesn't work in Safari on OSX. I get the error message:

TypeError: Result of expression 'win.document.activeElement.search' [undefined] is not an object. imce_wysiwyg.js?f:16

Any ideas??

Regards,

- Paul

CinemaSaville’s picture

I'm also not getting the "Send to ckeditor" button to work on Safari on OSX. It's fine with FF though.

Borigor’s picture

got next message while patching with http://drupal.org/files/issues/ckeditor_imce_yas-fix.zip:
"D:\wamp\www\drupal>patch -p0 < ckeditor.inc_fixedlists.patch
can't find file to patch at input line 9
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|? ckeditor.inc_fixedlists.patch
|Index: ckeditor.inc
|===================================================================
|RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/editors/ckeditor.in
c,v
|retrieving revision 1.2
|diff -u -p -r1.2 ckeditor.inc
|--- ckeditor.inc 10 Aug 2009 22:54:40 -0000 1.2
|+++ ckeditor.inc 19 Aug 2009 20:54:13 -0000
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored"

and, next message while patching with http://drupal.org/files/issues/imce_wysiwyg-533168.patch
"D:\wamp\www\drupal>patch -p0 < imce_wysiwyg-533168.patch
can't find file to patch at input line 8
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: imce_wysiwyg.module
|===================================================================
|RCS file: /cvs/drupal-contrib/contributions/modules/imce_wysiwyg/imce_wysiwyg.m
odule,v
|retrieving revision 1.4
|diff -u -p -r1.4 imce_wysiwyg.module
|--- imce_wysiwyg.module 4 Mar 2009 15:52:16 -0000 1.4
|+++ imce_wysiwyg.module 17 Sep 2009 12:23:48 -0000
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 38
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: js/imce_wysiwyg.js
|===================================================================
|RCS file: /cvs/drupal-contrib/contributions/modules/imce_wysiwyg/js/imce_wysiwy
g.js,v
|retrieving revision 1.3
|diff -u -p -r1.3 imce_wysiwyg.js
|--- js/imce_wysiwyg.js 25 Feb 2009 16:31:46 -0000 1.3
|+++ js/imce_wysiwyg.js 17 Sep 2009 12:23:49 -0000
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored"

what's wrong with me?

Yas375’s picture

i don't know how to work with patches yet. That's why I can advice you to see differencies manualy. There only a few changes.

DanielJohnston’s picture

Subscribing, with +1 to the getting it working in Safari issue

picciuto’s picture

subscribe

georgedamonkey’s picture

subscribe

xurizaemon’s picture

Status: Reviewed & tested by the community » Needs work

Very nice. Works for me, excepting issue where trying to return image to CK in Safari will result in the browser visiting the image instead.

Happy to test further fixes for Safari support. I recall Safari worked OK with IMCE Wysiwyg using TinyMCE or FCK so feel this should go back to needs work, even though I'm sure we'd love to see it included ASAP.

dsms’s picture

subscribe

jrabeemer’s picture

Status: Needs work » Reviewed & tested by the community

Moving back to RTBC. Unless someone here has a patch for Safari a browser with 3% marketshare, I don't believe we should hold up the other browsers.

Please file a separate bug for Safari.

chowdah’s picture

So, is this now included in the latest dev release [dated October 31, 2009]?

jaxtheking’s picture

Has anyone noticed that when one places the cursor in the editor's textarea in IE, the cursor does not appear straight away? After fiddling a bit with it, eventually it does... Not really usable by a non-skilled client. It does not seem to happen in the official demo. Any idea??

xurizaemon’s picture

@chowdah, no the patch in #13 has not been added to the 6.x-1.x-dev release yet. You'll need to patch your copy - the patch applies cleanly to either the current stable or dev releases.

For us, CKEditor using IMCE Wysiwyg 6.x-1.0 with this patch applied works fine.

idealista’s picture

subscribe

Jax’s picture

The patch still applies but I'm not able to send the image to the editor. Clicking the selected image just opens a new tab which shows the image. This is FF 3.5.

suhock’s picture

FileSize
2.28 KB

I've added compatibility for Safari to the patch. Safari couldn't find the non-standard document.activeElement property, so I just used the location.href property instead. I also replaced the routine for finding the value of CKEditorFuncNum with a simple, strict regular expression for the sake of efficiency and added the "Browse Server" button to the Link dialog.

I've tested against Safari 4, FF3.5, IE6, and IE8, all on Windows.

cmcintosh’s picture

There is support missing for the html link for browsing to files on the server/uploading files to link to. I added the below to line #61 of the imce_wysiwyg.module file:

'LinkBrowser' => TRUE,
'filebrowserLinkBrowseUrl' => url('imce', array('query' => array('app' => $editor . '|sendto@imceCkeditSendTo|params@'))),

suhock’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1.91 KB

Actually,the LinkBrowser and other old FCKEditor options are no longer necessary. In fact, since the image, flash, and link browser calls are all identical, the whole options array can be reduced to one item:

'options' => array(
  'filebrowserBrowseUrl' => url('imce', array('query' => array('app' => $editor . '|sendto@imceCkeditSendTo|params@'))),
),

I'm including a revised patch with the corrected options list and a slightly more efficient regular expression for parsing the url. Since the initial patch was set to RTBC despite the Safari bug, I'm setting the status back to "needs review".

mrfelton’s picture

tracking

budda’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #34 is true, and combined with patch #32 I've got a working solution in Safari.

sun’s picture

Status: Reviewed & tested by the community » Needs review
+++ js/imce_wysiwyg.js	3 Dec 2009 05:56:08 -0000
@@ -9,3 +9,14 @@ function imceImageBrowser(field_name, ur
+//sendTo function for ckeditor
+var imceCkeditSendTo = function(file, win) {
+  var parts = /\?(?:.*&)?CKEditorFuncNum=(\d+)(?:&|$)/.exec(win.location.href);
+  if (parts && parts.length > 1) {
+    CKEDITOR.tools.callFunction(parts[1], file.url);
+    win.close();
+  } else {
+    throw 'CKEditorFuncNum parameter not found or invalid: ' + win.location.href;
+  }
+};

ugh. Is there really no cleaner solution for CKeditor? I don't really want to believe this.

This review is powered by Dreditor.

suhock’s picture

The custom sendTo function is necessary for CKEditor. The proper way to return the path to the correct instance of CKEditor is to pass the value of the CKEditorFuncNum to the callFunction function. CKEditor passes this value through the URL of the IMCE browser, so it needs to be extracted from there. If there is a cleaner way, it's not documented.

talkingwires’s picture

Subscribing.

izmeez’s picture

subscribing

Francewhoa’s picture

subscribing

verta’s picture

subscribing

hadsie’s picture

The patch in #34 worked well for me after some basic testing (FF in Mac OSX)

chowdah’s picture

@ sun #37
No kidding, I just bailed and decided to use the ckeditor standalone module. Guess what! It works out of the box!

sun’s picture

Thanks. Such comments really help us to move forward.

izmeez’s picture

re: #44 and #45

I am not sure if the reply is tongue in cheek?

But, I am confused and trying to understand where this is heading.

I would like to use Wysiwyg module with ckeditor because it also supports options for other editors.
As such the IMCE Wysiwyg bridge module seems essential.

I see there is a patch and I am sorry I have not had time to test it with other tasks at hand.

Thanks

AdrianB’s picture

I am not sure if the reply is tongue in cheek?

I'm pretty sure sun was ironic.

sujeeshlald’s picture

Hi I also have the same issue of cursor not displaying in IE 8 and IE7. How did u fix that issue.

Thanks

Danny_Joris’s picture

subscribing.

yhager’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #34 works for me (FF 3.6 @ Linux)

@sun - I understand you are seeking a cleaner solution, however, this is a *working* solution. I suggest you consider applying this patch now, and refactor it later. This way people will find the module working for them on first shot, and will not have to find this patch and apply it (a high barrier for many it appears).

TimG1’s picture

subscribe

Dreher’s picture

How can I apply this patch manually?

ShannonK’s picture

subscribing

Anonymous’s picture

Subscribing and +1, awesome work guys!

sun’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for reporting, reviewing, and testing! Committed to all branches.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

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

Amir Simantov’s picture

Maintainer: Please update nodule's page as this is now available; it is still understood that there is no ckeditor support. Thanks!