I implemented CKFinder today in a Joomla site. It works beautifully in Firefox as an image manager for a photographic society with dozens of folders of images. It's an extremely well designed and implemented PHP/javascript plugin.
But when I began testing in Chrome and IE, I discovered that clicking Maximize instantly aborts the program. The CKEditor completely vanishes, when it should be there all the time because this is the Image File Manager page. This is on Win 7, 64 bit, IE 11, Chrome 40. BTW, Maximize is a terrific feature.
If the developer needs to see this behavior himself, please contact me for entry to the dev site. The javascript is:
<div id="image-file-editor">
<script type="text/javascript">
var finder = new CKFinder();
// The path for the installation of CKFinder (default = "/ckfinder/").
finder.basePath = '/cms/adm/';
// The default height is 400. 100% not yet supported per doc.
finder.height = 600;
finder.defaultDisplayFilesize = false;
finder.defaultViewType = 'list';
//finder.selectActionFunction = showCKEditorFile; Not needed, using Fancybox.
finder.create();
</script>
</div>
Thanks,
Jack
Fix for Maximize bug
This is a showstopper bug, so I've developed a fix. First, on the HTML page with CKFinder, use code something like this:
<script type="text/javascript" src="/cms/adm/ckfinder/ckfinder.js"></script>
<div id="image-file-editor">
<script type="text/javascript">
var finder = new CKFinder();
// The path for the installation of CKFinder (default = "/ckfinder/").
finder.basePath = '/cms/adm/';
// The default height is 400. 100% not yet supported per doc.
finder.height = 600;
finder.defaultDisplayFilesize = false;
finder.defaultViewType = 'list';
//finder.selectActionFunction = showCKEditorFile; Not needed, using Fancybox.
finder.create();
// Disable Maximize if IE or Chrome due to bug
initImageFileManager();
</script>
</div>
Note the initImageFileManager() function call. This is AFTER finder.create(). Then in your own javascript file use this:
// Image File Manager - If IE or Chrome, disable Maximize button
// Need to do this until the bug is fixed. It causes the manager to disapper.
function initImageFileManager() {
setTimeout(function() {
var iframe = document.getElementsByTagName('iframe')[0];
var iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
if ( isIE() || isChrome() ) {
var maximizeButton = iframeDocument.getElementsByClassName('cke_button_maximize')[0];
maximizeButton.style.display = 'none';
}
function isIE() {
userAgent = navigator.userAgent;
return userAgent.indexOf("MSIE ") > -1 || userAgent.indexOf("Trident/") > -1;
}
function isChrome() {
userAgent = navigator.userAgent.toLowerCase();
return userAgent.indexOf("chrome") > -1;
}
}, 1000);
}
In IE and Chrome the Maximize button will be hidden. In Firefox and other browsers it will appear as usual.
Cheers,
Jack