elFinder 2.0 and TinyMCE

Added by Christos Pontikis 10 months ago

elFinder 2.0b is impressive.
I cannot integrate it with tinyMCE. My configuration is following.
Actually, this configuration is working with elFinder 1.3, except of image preview is not working in tinymce.
Additionally it is not functional in Internet explorer (>8)
Thank you in advance!

tiny javascript call

file_browser_callback : function(field_name, url, type, win) {
    var w = window.open('/dev/mos/tools/elfinder/index.php', null, 'width=900,height=500');
    w.tinymceFileField = field_name;
    w.tinymceFileWin = win;
}

elfinder.php

editorCallback : function(url) {
    window.tinymceFileWin.document.forms[0].elements[window.tinymceFileField].value = url;
    window.tinymceFileWin.focus();

    //if (typeof(window.tinymceFileWin.ImageDialog) != "undefined") {
        //window.tinymceFileWin.ImageDialog.showPreviewImage(url);
    //}

    window.close();
}


Replies (2)

RE: elFinder 2.0 and TinyMCE - Added by Dmitry Levashov 10 months ago

elfinder.php

commandsOptions : {
  getfile : {
    onlyURL : true,
    multiple : false,
    folders : false
  },
  getFileCallback : function(url) {
    ....
  }
}

(1-2/2)