function Copiar(element) {
//creamos un input que nos ayudara a guardar el texto temporalmente
var $temp = $("<input>");
//lo agregamos a nuestro body
$("body").append($temp);
//agregamos en el atributo value del input el contenido html encontrado
//en el td que se dio click
//y seleccionamos el input temporal
$temp.val(element).select();
//ejecutamos la funcion de copiado
document.execCommand("copy");
//eliminamos el input temporal
$temp.remove();
}
var f = $('#finder').elfinder({
url : 'connectors/php/connector.php',
lang : 'es',
editorCallback : function(url) {
alert('Copiado al portapapeles');
Copiar(url);
//var elemento = window.tinymceFileField;
//window.opener.document.getElementById(elemento).value = url;
//window.tinymceFileWin.focus();
window.close();
},
closeOnEditorCallback : true
// docked : true,
// dialog : {
// title : 'File manager',
// height : 500
// }
})
Especial agradecimiento a Carlos Sierra García

No hay comentarios:
Publicar un comentario