estoy metiendome en el tema de prototipos con javascript y ando un poco perdido en un punto, el codigo es este
Código:
<script>
var wysi=function(target){
this.editor;
this.tgt=new String(target);
this.$=function(id){
return document.getElementById(id);
}
//Generacion del editor y sus componentes
this.$(this.tgt).innerHTML='<input type="button" id="'+this.tgt+'bold"/><br /> '+
'<iframe id="'+this.tgt+'ifr" width="100%" height="300" style=" border:1px solid #000;"></iframe>';
this.editor=this.$(this.tgt+'ifr').contentDocument || this.$(this.tgt+'ifr').contentWindow.document;
this.editor.designMode='on';
//Asignacion de funciones de los botones
this.botBold=this.$(this.tgt+'bold');
this.botBold.onmouseup=function(){ed1.editor.execCommand('bold', false, null)};
}
var ed1;
window.onload=function(){
ed1=new wysi('wys');
}
</script>
lo que trato de solventar es este punto
this.botBold.onmouseup=function(){ed1.editor.execC ommand('bold', false, null)};
pero bien, eso de meter ed1 dentro de la clase funciona pero no debe ser asi y no logro saber como preguntarle a google como se hace ese punto en concreto