Ticket #2873 (new New Feature)

Opened 19 months ago

Last modified 11 months ago

Server side integration - File Browser

Reported by: wwalc Owned by: wwalc
Priority: Normal Milestone:
Component: File Browser Version:
Keywords: Discussion Cc:

Description

Port the file browser from V2.

Attachments

2873.patch Download (225.8 KB) - added by wwalc 19 months ago.
2873_images.zip Download (10.5 KB) - added by wwalc 19 months ago.
2873_test_plugin.zip Download (2.1 KB) - added by wwalc 19 months ago.

Change History

Changed 19 months ago by wwalc

  • owner set to wwalc

Changed 19 months ago by wwalc

Changed 19 months ago by wwalc

Changed 19 months ago by wwalc

Changed 19 months ago by wwalc

In the 2873_test_plugin.zip file there is a dummy plugin just to help in testing the filebrowser plugin, it will a blank button to the toolbar (...).

Files from 2873_images.zip should be copied into _source\plugins\filebrowser directory.

Some probably ugly things:

  • I had to style some elements in the dialog box, I have done it with the style tag which is rather a bad idea.
  • Two global functions are registered: SetUrl and OnUploadCompleted to connect with the external file browser / file uploader.
  • Some variables are stored in [editor_instance].plugins.filebrowser, I'm not sure whether it's the best place to put those variables/functions.

For a better understanding of this plugin the filebrowsertest plugin may come in handy.

It is possible to use the external file browser either by setting these variables:

CKEDITOR.config.filebrowser_browse_url
CKEDITOR.config.filebrowser_upload_url

or by setting the filebrowser.url attribute for a specific UI element:

  filebrowser : 
  {
  	action : 'Browse',
  	url : '/ckfinder/ckfinder.html?action=js&func=SetUrl&thumbFunc=SetUrl&type=Images',
  	updateOnSelect : ['tab1', 'id10']
  }
  filebrowser : 
  { 
  	action : 'QuickUpload', 
  	url : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
  	updateOnUpload : ['tab1', 'id10'] 
  },  

Because there is a possibility that someone might want to use two or more different file browsers at the same time in CKEditor, the filebrowser plugin will attach itself automatically only to the elements with the following IDs: 'browse', 'uploadButton', 'url'.

Changed 19 months ago by wwalc

  • keywords Review? added

Changed 17 months ago by fredck

  • milestone changed from CKEditor 3.0 to CKEditor 3.x

Changed 14 months ago by arczi

#3895 has been marked as DUP

Changed 11 months ago by fredck

  • keywords Discussion added; Confirmed Review? removed
  • milestone CKEditor 3.x deleted

At this time, we're not likely to have the file browser in CKEditor.

Note: See TracTickets for help on using tickets.