elfinder.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
  7. <title>elFinder 2.1.x source version with PHP connector</title>
  8. <!-- Require JS (REQUIRED) -->
  9. <!-- Rename "main.default.js" to "main.js" and edit it if you need configure elFInder options or any things -->
  10. <script data-main="./main.default.js" src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.3.5/require.min.js"></script>
  11. <script>
  12. define('elFinderConfig', {
  13. // elFinder options (REQUIRED)
  14. // Documentation for client options:
  15. // https://github.com/Studio-42/elFinder/wiki/Client-configuration-options
  16. defaultOpts : {
  17. url : 'php/connector.minimal.php' // connector URL (REQUIRED)
  18. ,commandsOptions : {
  19. edit : {
  20. extraOptions : {
  21. // set API key to enable Creative Cloud image editor
  22. // see https://console.adobe.io/
  23. creativeCloudApiKey : '',
  24. // browsing manager URL for CKEditor, TinyMCE
  25. // uses self location with the empty value
  26. managerUrl : ''
  27. }
  28. }
  29. ,quicklook : {
  30. // to enable preview with Google Docs Viewer
  31. googleDocsMimes : ['application/pdf', 'image/tiff', 'application/vnd.ms-office', 'application/msword', 'application/vnd.ms-word', 'application/vnd.ms-excel', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']
  32. }
  33. }
  34. // bootCalback calls at before elFinder boot up
  35. ,bootCallback : function(fm, extraObj) {
  36. /* any bind functions etc. */
  37. fm.bind('init', function() {
  38. // any your code
  39. });
  40. // for example set document.title dynamically.
  41. var title = document.title;
  42. fm.bind('open', function() {
  43. var path = '',
  44. cwd = fm.cwd();
  45. if (cwd) {
  46. path = fm.path(cwd.hash) || null;
  47. }
  48. document.title = path? path + ':' + title : title;
  49. }).bind('destroy', function() {
  50. document.title = title;
  51. });
  52. }
  53. },
  54. managers : {
  55. // 'DOM Element ID': { /* elFinder options of this DOM Element */ }
  56. 'elfinder': {}
  57. }
  58. });
  59. </script>
  60. </head>
  61. <body>
  62. <!-- Element where elFinder will be created (REQUIRED) -->
  63. <div id="elfinder"></div>
  64. </body>
  65. </html>