Search This Blog

Monday, December 20, 2010

fck editor upload solved

To assign the filebrowser plugin to an element inside of a dialog box, set the "filebrowser" property. For example in _source/plugins/image/dialogs/image.js there is:
{
 type : 'button',
 hidden : true,
 id : 'browse',
 filebrowser : 'Link:txtUrl',
 label : editor.lang.common.browseServer,
 style : 'float:right',
},

Adding "Quick Upload" support

Again, to see how we can handle file uploads in our dialog box, we'll use working example from CKEditor. In _source/plugins/image/dialogs/image.js there is a definition of the Upload tab:
{ id : 'Upload', hidden : true, filebrowser : 'uploadButton', label : editor.lang.image.upload, elements : [ { type : 'file', id : 'upload', label : editor.lang.image.btnUpload, style: 'height:40px', size : 38 }, { type : 'fileButton', id : 'uploadButton', filebrowser : 'info:txtUrl', label : editor.lang.image.btnUpload, 'for' : [ 'Upload', 'upload' ] } ] },

No comments:

Post a Comment