file-manager.html 891 B

1234567891011121314151617181920212223242526272829303132
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>FileManager Examples</title>
  6. <link rel="stylesheet" href="../themes/default/default.css" />
  7. <script src="../kindeditor.js"></script>
  8. <script src="../lang/zh_CN.js"></script>
  9. <script>
  10. KindEditor.ready(function(K) {
  11. var editor = K.editor({
  12. fileManagerJson : '../php/file_manager_json.php'
  13. });
  14. K('#filemanager').click(function() {
  15. editor.loadPlugin('filemanager', function() {
  16. editor.plugin.filemanagerDialog({
  17. viewType : 'VIEW',
  18. dirName : 'image',
  19. clickFn : function(url, title) {
  20. K('#url').val(url);
  21. editor.hideDialog();
  22. }
  23. });
  24. });
  25. });
  26. });
  27. </script>
  28. </head>
  29. <body>
  30. <input type="text" id="url" value="" /> <input type="button" id="filemanager" value="浏览服务器" />
  31. </body>
  32. </html>