-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Integration with elRTE 1.x
troex edited this page Aug 12, 2011
·
17 revisions
$('selector').elrte({
fmOpen : function(callback) {
$('<div />').dialogelfinder({
url: 'php/connector.php',
commandsOptions: {
getfile: {
oncomplete: 'destroy' // destroy elFinder after file selection
}
}
getFileCallback: callback // pass callback to file manager
});
}
});
var dialog;
$('selector').elrte({
fmOpen: function(callback) {
if (!dialog) {
// create new elFinder
dialog = $('<div />').dialogelfinder({
url: 'connectors/php/connector.php',
commandsOptions: {
getfile: {
oncomplete : 'close' // close/hide elFinder
}
}
getFileCallback: callback // pass callback to file manager
});
} else {
// reopen elFinder
dialog.dialogelfinder('open')
}
}
});
http://elrte.org/redmine/boards/2/topics/3210?r=3232#message-3232