(→JavaScript integration) |
|||
Line 10: | Line 10: | ||
The example of creating CKFinder using a static javascript method: | The example of creating CKFinder using a static javascript method: | ||
− | < | + | <source> |
<script type="text/javascript"> | <script type="text/javascript"> | ||
CKFinder.Create( '/ckfinder/', 700 ) ; | CKFinder.Create( '/ckfinder/', 700 ) ; | ||
</script> | </script> | ||
− | </ | + | </source> |
More flexible method of launching CKFinder, the object with selected settings is passed as the only argument: | More flexible method of launching CKFinder, the object with selected settings is passed as the only argument: | ||
− | < | + | <source> |
<script type="text/javascript"> | <script type="text/javascript"> | ||
CKFinder.Create( { BasePath : '/ckfinder/', RememberLastFolder : false } ) ; | CKFinder.Create( { BasePath : '/ckfinder/', RememberLastFolder : false } ) ; | ||
</script> | </script> | ||
− | </ | + | </source> |
Latest revision as of 12:54, 18 January 2010
JavaScript integration
Integration using javascript code is a bit more powerful. The javascript integration file provides also a Popup method, which can be used to open CKFinder in a popup window. Please refer to the popup.html and popups.html samples in the "_samples/js/" directory for a working example.
The JavaScript integration method provides also two static methods to launch CKFinder, which can accept either four arguments or the settings object as the only argument.
- CKFinder.Create( basePath, width, height, selectFunction ) - Simple static method supporting only basic four arguments. All arguments except basePath are optional.
- CKFinder.Create( settingsObject ) - Pass an object with selected properties as the only argument.
- CKFinder.Popup( basePath, width, height, selectFunction ) - Simple static method supporting only basic four arguments. All arguments except basePath are optional.
- CKFinder.Popup( settingsObject ) - Pass an object with selected properties as the only argument.
The example of creating CKFinder using a static javascript method:
<script type="text/javascript"> CKFinder.Create( '/ckfinder/', 700 ) ; </script>
More flexible method of launching CKFinder, the object with selected settings is passed as the only argument:
<script type="text/javascript"> CKFinder.Create( { BasePath : '/ckfinder/', RememberLastFolder : false } ) ; </script>