elfinder.html 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 CAD-Files and 3D-Models preview with sharecad.org
  31. sharecadMimes : ['image/vnd.dwg', 'image/vnd.dxf', 'model/vnd.dwf', 'application/vnd.hp-hpgl', 'application/plt', 'application/step', 'model/iges', 'application/vnd.ms-pki.stl', 'application/sat', 'image/cgm', 'application/x-msmetafile'],
  32. // to enable preview with Google Docs Viewer
  33. 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', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/postscript', 'application/rtf'],
  34. // to enable preview with Microsoft Office Online Viewer
  35. // these MIME types override "googleDocsMimes"
  36. officeOnlineMimes : ['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', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.oasis.opendocument.text', 'application/vnd.oasis.opendocument.spreadsheet', 'application/vnd.oasis.opendocument.presentation']
  37. }
  38. }
  39. // bootCalback calls at before elFinder boot up
  40. ,bootCallback : function(fm, extraObj) {
  41. /* any bind functions etc. */
  42. fm.bind('init', function() {
  43. // any your code
  44. });
  45. // for example set document.title dynamically.
  46. var title = document.title;
  47. fm.bind('open', function() {
  48. var path = '',
  49. cwd = fm.cwd();
  50. if (cwd) {
  51. path = fm.path(cwd.hash) || null;
  52. }
  53. document.title = path? path + ':' + title : title;
  54. }).bind('destroy', function() {
  55. document.title = title;
  56. });
  57. }
  58. },
  59. managers : {
  60. // 'DOM Element ID': { /* elFinder options of this DOM Element */ }
  61. 'elfinder': {}
  62. }
  63. });
  64. </script>
  65. </head>
  66. <body>
  67. <!-- Element where elFinder will be created (REQUIRED) -->
  68. <div id="elfinder"></div>
  69. </body>
  70. </html>