Ticket #6085 (confirmed New Feature)

Opened 4 years ago

Last modified 11 months ago

filemanager in the same window

Reported by: mihai 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

filebrowser-url-function.diff (650 bytes) - added by mihai 4 years ago.
file browser url as function patch

Change History

Changed 4 years ago by mihai

file browser url as function patch

comment:1 Changed 4 years ago by mihai

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 4 years ago by comp615

Could be wrapped in with #5308 next version

comment:3 Changed 4 years ago by mihai

That would be great. Thanks!

comment:4 Changed 4 years ago by alfonsoml

  • Keywords HasPatch added

comment:5 Changed 22 months ago by j.swiderski

#9350 was marked as duplicate.

comment:6 Changed 22 months ago by j.swiderski

  • Keywords HasPatch removed
  • Status changed from new to confirmed
  • Version changed from 3.3.1 to 3.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 follow-up: ↓ 10 Changed 22 months 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 19 months ago by j.swiderski

#9744 was marked as duplicate.

comment:9 Changed 19 months ago by j.swiderski

#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 18 months ago by colsie007

Alex - did you ever get a resolution to this.

comment:11 Changed 18 months 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 17 months ago by j.swiderski

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

comment:13 Changed 17 months 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 12 months ago by bradbyu

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 12 months ago by jsmith

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

comment:16 Changed 11 months ago by cfi

  • Cc fink.christoph@… added
  • Version changed from 3.0 to 4.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 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy