source: branches/MootoolsFileManager-Update/plugins/MootoolsFileManager/mootools-filemanager/Demos/CKEditor.php @ 1300

Last change on this file since 1300 was 1300, checked in by gogo, 4 years ago

Update the MootoolsFileManager? to the latest cpojer with some modifications.
Add a demo for the MFM examples/mootools-file-manager.php
Change the default config for ImageManager and ExtendedFileManager for added security.

File size: 2.1 KB
Line 
1<!DOCTYPE html>
2<html>
3  <head>
4  <meta charset="UTF-8" />
5  <meta http-equiv="content-language" content="<?php echo $_GET['langCode']; ?>" />
6 
7  <title>MooTools FileManager CKEditor example</title>
8 
9  <!-- thirdparty/MooTools -->
10  <script type="text/javascript" src="mootools-core-1.3.js"></script>
11  <script type="text/javascript" src="mootools-more.js"></script>
12 
13  <!-- thirdparty/MooTools-FileManager -->
14  <script type="text/javascript" src="../Source/FileManager.js"></script>
15  <script type="text/javascript" src="../Source/Uploader/Fx.ProgressBar.js"></script>
16  <script type="text/javascript" src="../Source/Uploader/Swiff.Uploader.js"></script>
17  <script type="text/javascript" src="../Source/Uploader.js"></script>
18  <script type="text/javascript" src="../Language/Language.<?= $_GET["langCode"]; ?>.js"></script>
19
20  <script type="text/javascript">
21  /* <![CDATA[ */
22   
23   /* To use Mootools-FileManager with CKEditor you need set the following CKEDITOR.configs:
24    *
25    * CKEDITOR.config.filebrowserBrowseUrl      = 'path/to/this/CKEditor.php';
26    * CKEDITOR.config.filebrowserWindowWidth    = 1024; // optional
27    * CKEDITOR.config.filebrowserWindowHeight   = 700;  // optional
28    *
29    */
30 
31    function openFilemanager() {
32      var complete = function(path, file){
33        window.opener.CKEDITOR.tools.callFunction('<?= $_GET["CKEditorFuncNum"]; ?>', path);
34        window.close();
35      };
36
37      var fileManager = new FileManager({
38          url: 'manager.php',
39          assetBasePath: '../Assets',
40          language: '<?= $_GET["langCode"]; ?>',
41          destroy: true,
42          upload: true,
43          rename: true,
44          download: true,
45          createFolders: true,
46          selectable: true,
47          hideClose: true,
48          hideOverlay: true,
49          onComplete: complete
50      });
51      fileManager.filemanager.setStyle('width','100%');
52      fileManager.filemanager.setStyle('height','95%');
53     
54      fileManager.show();
55    }
56   
57    window.addEvent('domready', function(){
58      openFilemanager();
59    });
60  /* ]]> */
61  </script>
62 
63  <style type="text/css">
64  body {
65    overflow: hidden;
66  }
67  </style>
68</head>
69<body>
70</body>
71</html>
Note: See TracBrowser for help on using the repository browser.