Opened 14 years ago

Last modified 11 years ago

#6085 confirmed New Feature

filemanager in the same window

Reported by: Mihai Secasiu Owned by:
Priority: Normal Milestone:
Component: File Browser Version: 4.2
Keywords: Cc: alex@…, glen.84@…, fink.christoph@…

Description

With any file manager when I click the "Browse server" button ckeditor opens a new window/popup . I want ckeditor to allow me to open the filemanager in a "fake" popup like the one that are created from javascript. I'm developing an application using extjs and I would like to be able to open a filemanager in a window created by extjs.

I thought the easiest way to do this is to modify the filebrowser plugin to make it call a function instead of opening the "url" in a popup. then that function will call whatever extjs code I would need to create the window.

I made this simple modification to the filebrowser plugin and it would be nice if it could be integrated in future versions as it would be easier to mange the updates and I think others might benefit from it too.

the attached patch is for ckeditor 3.3.1

Attachments (1)

filebrowser-url-function.diff (650 bytes) - added by Mihai Secasiu 14 years ago.
file browser url as function patch

Download all attachments as: .zip

Change History (17)

Changed 14 years ago by Mihai Secasiu

file browser url as function patch

comment:1 Changed 14 years ago by Mihai Secasiu

I forgot to mention ( for those that will not look at the patch ) the plugin will still work as it did before if you use an actual URL for config options like CKEDITOR.config.filebrowserImageBrowseUrl but if you set a function for it then the plugin will just call your function.

comment:2 Changed 14 years ago by Charlie

Could be wrapped in with #5308 next version

comment:3 Changed 14 years ago by Mihai Secasiu

That would be great. Thanks!

comment:4 Changed 13 years ago by Alfonso Martínez de Lizarrondo

Keywords: HasPatch added

comment:5 Changed 12 years ago by Jakub Ś

#9350 was marked as duplicate.

comment:6 Changed 12 years ago by Jakub Ś

Keywords: HasPatch removed
Status: newconfirmed
Version: 3.3.13.0

Instead of overwriting default behaviour CKEditor should provide new configuration option E.g. CKEDITOR.config.filebrowserCallback.

That way instead of specifying all filebrowserXYZBrowseUrl}} and perhaps {{{filebrowserXYZUploadUrl user will only need to define only CKEDITOR.config.filebrowserCallback to call his custom ExtJS or jQuery window with file-manager.

I’m not sure if in such case quickuploads (upload tabs) should be available or not.

comment:7 Changed 12 years ago by AlexW

Cc: alex@… added

That would work, Possibly pass a function to allow selecting.

CKEDITOR.config.fileBrowserCallback = function(selected) {
    //File find code.
    selected('my selected file');
});

Would this be better to suggest for v4

comment:8 Changed 11 years ago by Jakub Ś

#9744 was marked as duplicate.

comment:9 Changed 11 years ago by Jakub Ś

#8816 was marked as duplicate.

#8816 is about opening filebrowser in iframe dialog. This should be possible with custom function assigned.
Something extra that came to my mind is that perhaps some parameters like editor object should be passed to this function to ease our native dialogs invocation

comment:10 in reply to:  7 Changed 11 years ago by Simon

Alex - did you ever get a resolution to this.

comment:11 Changed 11 years ago by darkangel

Cc: glen.84@… added

Any updates on this? We need to be able to insert the selected file from the callback, as mentioned by AlexW.

comment:12 Changed 11 years ago by Jakub Ś

No one from CKSource team is working on this issue at the moment.

comment:13 Changed 11 years ago by AlexW

Might help some people, https://github.com/Alex-Code/ckeditor-dev/blob/master/plugins/filebrowser/plugin.js

You can use this,

config.fileBrowserCallback = function(selected) {
  selected('myimage.png');
};

comment:14 Changed 11 years ago by Brad

I found this ticket while looking for a solution to open CKFinder within a dialog window, not a new browser window. I need this functionality as we are keeping our users' experience contained to a single, open webpage. We have upgraded to 4.2. I like the idea of having this be a configuration option. Please re-investigate adding this feature.

comment:15 Changed 11 years ago by Joshua Smith

I'm casting a vote for this feature. The callback function as proposed by AlexW would work for me.

comment:16 Changed 11 years ago by cfi

Cc: fink.christoph@… added
Version: 3.04.2

I just tried to update from 4.0 to 4.2, but the patch from AlexW does not work there anymore as there is no filebrowser plugin anymore (integrated in core?) for me...

Please add this functionality!

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy