# Option: file_browser_callback

This option enables you to add your own file browser/image browser to TinyMCE. This function is executed each time a user clicks on the "browse" buttons in various dialogs. The format of this callback function is: fileBrowser(field_name, url, type, win) where field_name is the id/name of the form element that the browser should insert it's URL into. The url parameter contains the URL value that is currently inside the field. The type parameter contains what type of browser to present this value can be file, image or flash depending on what dialog is calling the function. The win parameter contains a reference to the dialog/window that executes the function.

### Example of usage of the file_browser_callback option:

    function myCustomFileBrowser(field_name, url, type, win) {
        // Do custom browser logic
        win.document.forms[0].elements[field_name].value = 'my browser value';
    }

    tinyMCE.init({
        ...
        file_browser_callback : "myCustomFileBrowser"
    });