TinyMCE integration

Roxy Fileman is ready for use with TinyMCE 3.x and 4.x. Here you will find step by step guide to TinyMCE custom file browser installation. 

Install Roxy Fileman as described in Installation instructions.
Set configuration option INTEGRATION to "tinymce3" or "tinymce4", depending on your TinyMCE version.
Set this option when initializing TinyMCE: file_browser_callback: your_function_to_open_Fileman

Example (using JQuery onload):

<script> 
$(function() {   
  tinyMCE.init({selector: '#tinymce', plugins: 'link image',
                  toolbar: "link | image", file_browser_callback: RoxyFileBrowser}); 
});
function RoxyFileBrowser(field_name, url, type, win) {
  var roxyFileman = '/fileman/index.html';
  if (roxyFileman.indexOf("?") < 0) {     
    roxyFileman += "?type=" + type;   
  }
  else {
    roxyFileman += "&type=" + type;
  }
  roxyFileman += '&input=' + field_name + '&value=' + win.document.getElementById(field_name).value;
  if(tinyMCE.activeEditor.settings.language){
    roxyFileman += '&langCode=' + tinyMCE.activeEditor.settings.language;
  }
  tinyMCE.activeEditor.windowManager.open({
     file: roxyFileman,
     title: 'Roxy Fileman',
     width: 850, 
     height: 650,
     resizable: "yes",
     plugins: "media",
     inline: "yes",
     close_previous: "no"  
  }, {     window: win,     input: field_name    });
  return false; 
}
</script>

For more details about custom TinyMCE 4 file and image browser see the TinyMCE 4 or TinyMCE 3 documentation.