This is hands down the best file browser I've seen on Drupal. I recently moved my site over to CKEditor, and I would love to see support for it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pixture’s picture

Assigned: Unassigned » pixture

I originally tried to support CKEditor just like I did for FCKeditor (patch was required). But there were some issues to be addressed to support CKEditor and I decide to do it later since it make take some time. CKEditor support is one of the next things to do for TinyBrowser.

bryancasler’s picture

I'm not a developer, but I would most certainly test that release. What problems were preventing you from implementing it?

bryancasler’s picture

I posted this same request in the WYSIWYG issue que before you responded. I really wasn't sure where development shoud fall. There was a follow up post however that may be helpful.

"The code for that would probably be very similar to what's in the patch for IMCE Wysiwyg Bridge: #533168: Add support for CKeditor"

pixture’s picture

I did a little bit of experiment this afternoon and I have made the basic functions work (open TinyBrowser window, select image, close TinyBrowser window, insert image back to the small image setting window..) with CKEditor.

The remaining issue is that the vertical scroll bar is somehow not displayed at the TinyBrowser window. I am trying figuring out this issue. I hope that it would not take a long time and I can release a new version that supports CKEditor soon. (hopefully sometime this week?)

bryancasler’s picture

That would be fantastic, and again I would be willing to help test anything you put out.

pixture’s picture

Attached is the TinyBrowser module that supports CKEditor (currently only with CKEditor module, not with Wyswyg module). Please use this TinyBrowser module for CKEditor.

There are also two patche files attached.

  • ckeditor.module.patch
    This is same as FCKeditor.patch. The Drupal CKEditor module file (sites/all/modules/ckeditor/ckeditor.module) needs to be patched.
  • ckeditor.js.patch
    It's turned out that the reason of missing vertical scrollbar at TinyBrowser windows is because of the bug of the ckeditor.js (or maybe just a design which support only file browser that does not use scrollbars). Anyway, CKEditor JS file (sites/all/modules/ckeditor/ckeditor/ckeditor.js) needs to be patched. This patch adds the 'scrollbars=yes' parameter to the proper place of the JS file. Since ckeditor.js is packed Javascript file, it's not easy to manually change it.

Please do not forget to make a backup copy before applying the patch. With my server and Drupal environment, it seems that everying's working OK with CKEditor.
Once it works with your server, I will work on the support for the Wysiwyg module + CKEditor case.

Thank you for your cooperation.

bryancasler’s picture

FileSize
159.17 KB

Just gave this a go and had some weird side effects.

1. CKEditor is not showing up anymore
2. Input fields are horizontally shorter (possible side effect of #1)
3. Collapsible Field Sets are gone, everything is permanently expanded.
4. DHTML Menu's have stopped working (possible side effect of #3)

pixture’s picture

@animelion,

Thanks for testing it. Could you do the followings?

1) Go to TinyBrowser module settings page and make sure that CKEditor with CKEditor module is selected at WYSIWYG editor section.

2) Go to CKEditor module settings page and TinyBrowser is selected at the File browser settings section.

3) Clear Drupal's cache at Administer > Site configuration > Performance page

4) Clear web browser's cache on your local PC

5) Restart web browser

6) If you can check any Javascript error, please find the detail info. (For Firefox, you can open error console from the tools menu and get Javascript error information).

Thank you,

bryancasler’s picture

TinyBrowser is not showing up in step 2.

Here (admin/settings/ckeditor/edit/Authenticated) under "File browser type (Link dialog):" all I see is "None", "CKFinder", "IMCE"

**I had to manually apply the patch to CKEditor.module, there is a possibility I messed it up. Could you upload your patched CKEditor.module?

pixture’s picture

FileSize
98.68 KB

@animelion,

I attached an archive that includes patched ckeditor.module and ckeditor.js file which should replace

sites/all/modules/ckeditor/ckeditor.module
sites/all/modules/ckeditor/ckeditor/ckeditor.js

Please do not forget to back up the original. Once you have set these files, please go to the Administer > Site building > Modules page and disable the CKEditor module first, and then enable it again to make sure the new module's code is loaded.

Please let me know the result. Thanks!

bryancasler’s picture

I found that my all problems in post #7 were being caused by using this module http://drupal.org/project/javascript_aggregator I have removed it for now.

--
Installed your patched files.
Disabled then Re-enabled the CKEditor Module.
Cleared site cache
Cleared browser cache
Went to TinyBrowser module settings page and made sure that CKEditor module is selected at WYSIWYG editor section.
***Went to CKEditor module settings page and tried to set TinyBrowser in the File browser settings section.
***Tinybrowser is still not showing up as an option for me to select
--

When I go to my node creation page and look at Firefox's error console all I get are warnings (ALL CSS related) and 1 jquery warning related to the imagefield_crop module.

Hope this helps.

pixture’s picture

@anilemion,

I am very sorry but I have just realized I needed to give you one more patch for ckeditor.admin.inc.
The reason you did not see the 'TinyBrowser' in the pull-down list of File browser settings of CKEditor.

I attached the new archive, which includes patched ckeditor.admin.inc, which should replace:

sites/all/modules/ckeditor/includes/ckeditor.admin.inc.

Other files in this archive are same as the previous one. Please replace ckeditor.admin.inc with the enclosed one and test it.

Besides, I will do some research on javascript_aggregator module since I may have to add this module as the known conflict and requirement section of the document.

Thank you,

bryancasler’s picture

That got it working! Playing around with it a little bit and will get back to you.

mandclu’s picture

subscribe

mephir’s picture

@pixture: can you provide patch for source version of ckeditor not minimalised ckeditor.js, but in all i think it should be better way to integrate tinybrowser and ckeditor. One question at last, why you patched ckeditor.js?

pixture’s picture

Without patching ckeditor.js, the vertical scroll bar would be missing at the TinyBrowser window. Please see the following issue on CKEditor Forum.

http://cksource.com/forums/viewtopic.php?f=11&t=15966

Because the 'ckeditor.js' code is optimized I'm not sure what the actual line number will be for you but I found the spot by searching for 'resizable=yes' and you'll get a couple results, it should be pretty obvious which one is the one you're looking for. It's in a 'popup' object.

Anyhow I just added 'scrollbars=yes' to the string and it worked.

The patch for ckeditor.js does this. I will see if I can provide the patch for non-packed version of ckeditor.js.

mephir’s picture

It isn't neccessary, i got the metter, now. Thanks for explain

pixture’s picture

@mephir

OK! I looked at the source code ckeditor/_source/plugins/popup/plugin.js and found that it call window.open() without scrollbars=yes as an option. This is the place where it should be modified.

BTW, could you think of adding code to CKEditor module (ckeditor.module and ckeditor.admin.inc) to support TinyBrowser?

Thanks,

mephir’s picture

Yes, today i will commit it to CVS, so tomorrow morning should be in dev version. Before it i must do some changes in your patch, like:

$host ."sites/all/modules/tinybrowser/tinybrowser/tinybrowser.php?type=image";

change for proper way to get path etc...

About changes in ckeditor.js. We decided to open ticket for it on our track(http://dev.fckeditor.net/ticket/5167). Now we can change this and i can attached here repacked version with this change.

Thanks for patch, i start to work with it.

mephir’s picture

Ok, changes commited CVS. CKEditor "scrollbars bug" will be fixed as soon as possible.

Last question, when the changes needed to run tinybrowser with ckeditor will be deployed in tinybrowser module ?

pixture’s picture

@mephir,

$host ."sites/all/modules/tinybrowser/tinybrowser/tinybrowser.php?type=image";

Yes, this is not a proper code. I guess you have used drupal_get_path('module', 'tinybrowser') instead.
I guess I hardcoded the path for my debug purpose and forgot to change to proper code before releasing it. Thanks!!

BTW, current development snapshot of TinyBrowser already has CKEditor module + CKEditor support code. I will release it as next official release (beta-2) sometime this week too. :-)

vlooivlerke’s picture

Version: 6.x-1.0-beta1 » 6.x-1.x-dev
Category: feature » bug

Hi I installed TinyBrowser with CKEditor module + CKEditor support code.

It creates the browse server button and opens up TinyBrowser.

It shows the files as a list. (Unable to select a Tumbnail view.
I can upload images, delete images, but cant insert them into the node from the TinyBrowser interface.
The file system works.

So the 2 major problems are:

No thumbnail creation
Unable to insert images

PS: where is those other feature of resizing and rotating?

pixture’s picture

1. Are you sure that you are using Image browser? It sounds like you are using File browser. File browser does not have Thumbnail view and no rotate/resize operations under Edit panel.

2. What happens when you select a file from the list? Does it insert the anchor tag of the file? or nothing????
If nothign happens, check the Javascript error (refer to the troubleshooting page).

vlooivlerke’s picture

Hi,

In CKeditor under file browser I have selected Tinybrowser.

Do i need to set it somewhere else?

Nothing happens when i select a file.

I have no js warnings.

pixture’s picture

Status: Active » Closed (fixed)

No activities for a couple of month.

jjancel’s picture

Hello
install tinybrowser to CKEditor 6.x-1.6
The patch no longer work,
you have an update
thank you