javascript - What does the filebrowser field actually do in CKEditor? -
the upload tab of image2 plugin looks -
{ id: 'upload', hidden: false, filebrowser: 'uploadbutton', label: lang.uploadtab, elements: [ { type: 'file', id: 'upload', label: lang.btnupload, style: 'height:40px', onchange: function(evt){ alert('file uploaded'); } }, { type: 'filebutton', id: 'uploadbutton', filebrowser: 'info:src', label: lang.btnupload, 'for': [ 'upload', 'upload' ] } ] }
here in 'tab'
details there filebrowser field equal 'uploadbutton'
, filebrowser field in ui element object equal 'info:src'
.
i not implementing browse server functionality, upload functionality. have implemented want understand how filebrowser plugin , filebrowser fields facilitating it?
can here explain here little bit in detail ckeditor documentation not tell much?
the ck_config.js file has settings determine url of file browser various purposes:
config.filebrowserbrowseurl = ''; config.filebrowserimagebrowseurl = ''; config.filebrowserflashbrowseurl = ''; config.filebrowseruploadurl = ''; config.filebrowserimageuploadurl = ''; config.filebrowserflashuploadurl = '';
basically webpage appears in 600px-wide popup. 1 of parameters of url (automatically added) ckeditorfuncnum determines callback function sending results ck.
on selection of file/path, typically do:
window.opener.ckeditor.tools.callfunction(ck_callback,pathrel2page);
where ck_callback ckeditorfuncnum value , pathrel2page selected file.
hth.
Comments
Post a Comment