elFinder destroys div on close and cannot be used more than once
Added by Paul Shipman 7 months ago
I am applying elFinder in elRTE with the following code. If I use the finder and close the dialog, or make a selection from the finder, the finder closes and will not reopen. Looking in the DOM the div that the finder is applied to no longer exists in the DOM.
Is there an option I need to set?
//-------------------------------------------------------------------
//RTE
//-------------------------------------------------------------------
$(".snippet_rte").addClass("elrte").elrte({
cssClass : 'el-rte',
doctype : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">',
// lang : 'ru',
height : 450,
width : 500,
toolbar : 'normal',
//cssfiles : ['css/elrte-inner.css'],
styleWithCSS: true,
allowSource: true,
absoluteURLs: true,
fmAllow: true,
fmOpen: function(callback){
$("#filebrowser2").elfinder({
url: 'connector/filebrowser.php',
dialog: {width: 900, modal:true, title: 'File manager'},
closeOnEditorCallback: true,
editorCallback: callback
});
}
});
//-------------------------------------------------------------------
Replies (1)
RE: elFinder destroys div on close and cannot be used more than once
-
Added by Troex Nevelin 7 months ago
Use $('<div id="filebrowser2" />').elfinder({ it will be created on new DOM element instead
See the example Integration_EN
(1-1/1)