hola manes tengo un problema con mozilla estoy haciendo mi propio editor de textos aqui el codigo
Código HTML:
function center(){
var txt=" ";
try {
txt =window.getSelection();
}
catch (err) {
try {
txt = document.getSelection();
}
catch (err2) {
var range = document.selection.createRange();
txt = range.text;
}
}
alert("\nTexto seleccionado: " + txt);
}
cuando el usuario selecciona cualquier texto manda un mensaje con el texto seleccionado pero en mozilla no me funciona en el textarea porque sera esto alguien sabe me puede ayudar