Ver Mensaje Individual
  #9 (permalink)  
Antiguo 05/02/2011, 22:51
Avatar de Panino5001
Panino5001
Me alejo de Omelas
 
Fecha de Ingreso: mayo-2004
Ubicación: -34.637167,-58.462984
Mensajes: 5.148
Antigüedad: 20 años
Puntos: 834
Respuesta: Problema con eventos en iframe firefox

Muy buena observación, zerokilled!
Igualmente, me parece mejor dejar los iframes y trabajar directamente con contentEditable:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<
title>Documento sin título</title>
<
script>
function 
formatText(cmd){
    
document.execCommand(cmdfalsenull);
}
function 
insertarImagen(){
    var 
u;
    if(!(
u=prompt('ingresar url','http://')))return;
     
document.getElementById('pp').focus();
     
document.execCommand("InsertImage",false,u);

</script>
</head>

<body>
<form action="" method="get">
  <input name="input" type="button" onclick="formatText('bold')" value="NEGRITA" /><input name="input" type="button" onclick="formatText('italic')" value="CURSIVA" /><input name="input" type="button" onclick="formatText('underline')" value="SUBRAYADO" /><input name="input" type="button" onclick="insertarImagen()" value="INSERTAR IMAGEN" />
</form>
<div onmouseup="document.getElementById('log').innerHTML='mouseup capturado'" onmousedown="document.getElementById('log').innerHTML='mousedown capturado'" id="pp" contenteditable="true">Este es un texto editable</div>
<div id="log"></div>
</body>
</html>