Bueno, miren resumí el código para demostrar como lo hago:
Código Javascript
:
Ver original<script type="text/javascript">
<!--
var Editor = function(id){
this.init = function(){
var elwin = this;
this.input_dom = document.getElementById(id);
this.iframe_dom = document.createElement('iframe');
with(this.iframe_dom){
src = 'about:blank';
style.height = '200px';
style.width = '500px';
}
setTimeout(function(){
if(elwin.iframe_document.designMode)
elwin.iframe_document.designMode = 'on';
else if(elwin.iframe_body.contentEditable)
elwin.iframe_body.contentEditable = true;
}, 100);
this.input_dom.parentNode.insertBefore(this.iframe_dom,this.input_dom);
with((this.iframe_dom.contentDocument || this.iframe_dom.contentWindow.document)) {
clear();
open();
write("<html><body></body></html>");
close();
}
this.iframe_document = this.iframe_dom.contentDocument || this.iframe_dom.contentWindow.document;
this.iframe_body = this.iframe_document.body || this.iframe_document.getElementsByTagName('body')[0];
this.iframe_dom.contentWindow.onmouseup = function(){alert('activo');};
};
this.init();
};
var editar;
window.onload=function(){
editar = new Editor('textarea');
};
-->
</script>
<textarea name="textarea" id="textarea" cols="55" rows="15"></textarea>
En chrome anda perfecto y se ejecuta el alert, y en firefox no :S..