Trying to find on google how to integrate elfinder with CKeditor, but not works.
There is an instruction here
but, its not work. It able to open elfinder. but, when i double click on image, it do not pass URL to image filed, but open picture viewer.
Try again and find this link
but, its not help too. And some people said that coding at github is usable for version 1. Now, elfinder is using version 2.0 rc1.
So, is there anyone could help me to integrate with CKeditor? It will be great.
Thanks.
in elfinder.html replace this code:
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript" charset="utf-8">
$().ready(function() {
var elf = $('#elfinder').elfinder({
url : 'php/connector.php' // connector URL (REQUIRED)
// lang: 'ru', // language (OPTIONAL)
}).elfinder('instance');
});
</script>
with code from wiki:
<script type="text/javascript" charset="utf-8">
// Helper function to get parameters from the query string.
function getUrlParam(paramName) {
var reParam = new RegExp('(?:[\?&]|&)' + paramName + '=([^&]+)', 'i') ;
var match = window.location.search.match(reParam) ;
return (match && match.length > 1) ? match[1] : '' ;
}
$().ready(function() {
var funcNum = getUrlParam('CKEditorFuncNum');
var elf = $('#elfinder').elfinder({
url : 'php/connector.php',
getFileCallback : function(file) {
window.opener.CKEDITOR.tools.callFunction(funcNum, file);
window.close();
},
resizable: false
}).elfinder('instance');
});</script>
tutorial is not so obvious but works ok..