Closed (fixed)
Project:
Web File Manager
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
17 Sep 2009 at 18:19 UTC
Updated:
26 Sep 2010 at 13:47 UTC
Jump to comment: Most recent file
I extended the support for webfm_popup to work with ckeditor and tinymce (I'm not sure if tinymce maybe already worekd beforhand) when using the wysiwyg-Modul.
The wysiwyg-people are in the process of adapting ckeditor:#462146: Add editor: CKeditor
Some of the ideas/code is taken from here: #533168: Add support for CKeditor
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | webfm_popup-580556-24-fullcleanup.patch | 9.49 KB | nhck |
| #22 | 580556-21-add-ckeditor.patch | 990 bytes | nhck |
| #18 | webfm-6.x-2.12.patch | 1.14 KB | jm.federico |
| #17 | webfm_popup.js_.txt | 2.05 KB | jm.federico |
| #2 | webfm_popup-580556-2.patch | 7.61 KB | nhck |
Comments
Comment #1
nhck commentedComment #2
nhck commentedappears there was an error in the last patch. Maybe someone wants to test this?
Comment #3
nhck commentedanyone?
Comment #4
cweagansI'm walking out the door right now, but I may be able to take a look tonight sometime. If not, then for sure tomorrow.
Comment #5
nhck commentedGot around to test this?
Comment #6
tseven commentedPatch #2 doesn't work properly.
The patching of the .info file fails (not important). The patch is successful on the .js and module file.
The popup opens and displays the webfm file browsers but ignores all file/folder permissions (allows the user to view all files and folders even if he's doesn't have permission to do so) and there is no obvious way of selecting the image for insertion.
Right-clicking a file and choosing the "past link into editor" option doesn't work.
Comment #7
nhck commentedAh interesting - thank you for taking the time and providing feedback Steven.
2 Side notes:
I was using Wysiwyg 3.x-dev: Libraries API, Chaos Tools Suite, jQuery UI 2.x, Popups API from their CVS (http://drupal.org/node/181465/cvs-instructions/HEAD)
and webfm from cvs.
also I was using Firefox 3.5
The Option "Paste link into Editor" must be removed for the popup I guess - the correct link to choose is "Send to rich text editor"
About the permission: Thats really strange since webfm_popup only includes webfm in a different way and doesn't change anything about webfm itself.
Maybe you can give a little more inside about which browser/versions of the modules you use - I will go look for the bugs then :-)
Comment #8
kwinters commentedI didn't have any luck before or after applying the patch, but the biggest issue is that the webfm tinymce button doesn't appear (I enabled Bold and the webfm plugins, but only Bold appears in the edit node form). Send to Rich Text Editor appears outside of the editor context, which probably shouldn't be true either (it's just going to error if you use it anywhere else, since it's not being used in a sub-window).
TinyMCE 3.2.5, WYSIWYG 6.x-2.0, WebFM Popup 6.x-2.11 in FF 3.5.3.
Comment #9
nhck commentedAs I mentioned above you must be using WYSIWYG 3 - I didn't mention this in the first post, because I thought it was clear because of #462146: Add editor: CKeditor - sorry about that.
So please if you use the patch:
Comment #10
kwinters commentedHmm, WYSIWYG 3 doesn't have any releases and (in all likelihood) won't until D7. So, even if it works many of us won't be able to use it.
Comment #11
nhck commentedHmm, but there is a Drupal 6 Branch so maybe you still would like to give it to try. I've got WYSIWYG 3 in Production use also.
Comment #12
kwinters commentedThere is a D6 branch, but that was started forever ago and probably won't be really done until the D7 release is finished. I wouldn't hold my breath on a good backport.
Although you could use devel in production, I try to avoid it.
Also, the usage statistics say 1400 people are using 6-3 and 28k are using 6-2. If it's reasonable to do so, 6-2 is definitely be the one to support.
Comment #13
nhck commentedYou are probably right - maybe you can test for tinymce over here #591132: ImageBrowser not working for TinyMCE in WYSIWYG module and we can provide a unified patch that works for both, wyswyig 2 and 3 later on.
Comment #14
aiphesi'm very interesting in this evolution because it would be a great thing to the both modules (wysiwyg and webfm)...i'll wait for this so...http://drupal.org/node/632166
Comment #15
stuen93 commentedI'd be interested to see this work with drupal 6 as well. I would really like to get my users to start using WebFM but I don't see it happening on a wide scale until it is integrated with wysiwyg and tinymce.
Comment #16
jm.federico commentedfor anyone interested in TinyMCE support using WYSIWYG 2.x branch, here is a patch for webfm_popup.js, replace the file with this.
What it fixes:
WebFM was sending the full path of the file to TinyMCE and we want it to send the WebFM path, which let us move files around with WebFM while not breaking links.
Comment #17
jm.federico commentedSorry, missed the file.
Comment #18
jm.federico commentedOk People,
Patch against 2.12
Works with Wysiwyg Module + Tinymce
Comment #19
robmilne commentedIn head
Comment #20
aiphesI've just applied the patch but popup doesnt open with WYSIWYG + TinyMCE...whats wrong ?
Comment #21
jm.federico commentedYou might need to enable webfm attachments in the node type you want:
/admin/content/node-type/YOURNODETYPE
Workflow settings: Webfm Attachements: Enable
Let me know if that fixes the issue
Comment #22
nhck commentedWhilst ckeditor in webfm_popup/webfm_popup.js adding support for it through webfm_popup/webfm_popup.module was forgotten? Attached a patch.
I can confirm the tinymce issue, but its very sporadic. (using TinyMCE 3.3.2 and Wysiwyg 6.x-2.1)
Comment #23
aiphesi've abandoned wysiwyg for FCKeditor + Webfm...but i'll try your solution on future website i think
Comment #24
nhck commentedSo I did some further clean up.
With this patch - editor integrations will have to provide the caller name in url thus the switch(). I think we need to do this in order to structure the code better. Right now - in webfm_popup.sendtocaller - we just kinda say: CKEDITOR? -> do this & bail out, tinymce? -> bail out, else? -> probably fckeditor. In order to support more editors - I am thinking of most of the editors wysiwyg supports - there needs to be a better structure.
I also improved the help and comments to reflect this. Furthermore I improved the naming of the tinymce caller. However I couldn't drill down to the problem pointed out in #20 - this must be due to a late loading.
Comment #25
robmilne commentedThanks Niels for taking the time to understand the issue. I'll cut a new rev by next week with your patch.
Comment #27
wdouglascampbell commentedI was able to use this patch to make things work for me but with two additional modifications.
Currently, the webfm_popup module doesn't support non-clean URLs.
So I had to change:
to:
Also, in IE the use of jQuery change() method doesn't work very well. I keep getting a JScript object expected error. I changed the three instances of calling the change() method to click() instead. I actually don't even think this line is needed since the function called by TinyMCE's javascript immediately returns when triggered by the input form item being changed.
Anyway, just thought I would share those in case others are still having problems with this patch.
Comment #28
nhck commented#580556 by nhck, jm.federico, wdouglascampbell | kwinters, aiphes: Added Full support for ckeditor and tinymce through wysiwyg-api.
Finally committed this. Thanks everyone for working on it. Please get the dev-release and reopen if there are still problems.
Ah one more thing: the implementation for ckeditor and fckeditor changed, they must now pass along caller=EDITORNAME as an argument.
Thanks everyone for the hints and for bearing with me on this.
Comment #30
jauzah commentedthe wysiwyg+tinymce integration still doesn't work, there is a bug in webfm_popup.js on line 76 ... you need to change
window.open(Drupal.settings.basePath + '/?q=webfm_popup&url=' + field_name + '&caller=tinymce', 'ImageBrowser',to:
window.open(Drupal.settings.basePath + '?q=webfm_popup&url=' + field_name + '&caller=tinymce', 'ImageBrowser',Comment #31
nhck commentedComment #32
jm.federico commented@jauzah
I'm closing this issue and opening a new one. #923256: extra "/" when openning wysiwyg popup
It just seems like it was a coding bug when changing the module to work when clean-urls is not enabled.