Ver Mensaje Individual
  #2 (permalink)  
Antiguo 20/10/2003, 02:43
Avatar de epplestun
epplestun
 
Fecha de Ingreso: octubre-2001
Mensajes: 1.621
Antigüedad: 25 años
Puntos: 5
Yo nose que recomendarte, yo me hice uno con la documentacion de DOM de Mozilla, y funciona bajo IE y Mozilla perfectamente, si te interesa algo solo para IE puedes usar el de esta web:

http://www.editworkspro.com/

http://www.webedpro.com/

Espero que te ayude en algo, como te dije, esos solo funcionan bajo IE

Aqui te dejo el codigo que uso yo para mi script.

Código PHP:
/*
   +----------------------------------------------------------------------+
   | RTE v.0.0.1                                                                      |
   +----------------------------------------------------------------------+
   | Copyright (c) 2001-2003 EppleMedia                              |
   +----------------------------------------------------------------------+
   | This source file is subject to version 2.02 of the PHP license,      |
   | that is bundled with this package in the file LICENSE, and is        |
   | available at through the world-wide-web at                           |
   | [url]www.php.net/license/2_02.txt[/url]                                 |
   | If you did not receive a copy of the PHP license and are unable to   |
   | obtain it through the world-wide-web, please send a note to          |
   | [email][email protected][/email] so we can mail you a copy immediately.               |
   +----------------------------------------------------------------------+
   | Authors: Ivan Rodriguez Espada [email]<[email protected][/email]>        |
   +----------------------------------------------------------------------+
*/
/*
 * Inicializa el editor
 */
function start()
{
    
document.getElementById('edit').contentWindow.document.designMode = "on";
}

/*
 * Indica el estilo que queremos dar a nuestra letra
 */
function estilo(estilo) 
{ 
    switch(
estilo)
    {
        case 
"Bold":
            
document.getElementById('edit').contentWindow.document.execCommand("Bold", false, null);
            break;
        case 
"Italic":
            
document.getElementById('edit').contentWindow.document.execCommand("Italic", false, null);
            break;
        case 
"Underline":
            
document.getElementById('edit').contentWindow.document.execCommand("Underline", false, null);
            break;
        case 
"Superscript":
            
document.getElementById('edit').contentWindow.document.execCommand("Superscript", false, null);
            break;
        case 
"Subscript":
            
document.getElementById('edit').contentWindow.document.execCommand("Subscript", false, null);
            break;
        case 
"Strikethrough":
            
document.getElementById('edit').contentWindow.document.execCommand("Strikethrough", false, null);
            break;
        default: break;
    }
    
document.getElementById('edit').contentWindow.focus();
}

/*
 * Genera una ventana Modal
 */
function VentanaMod(url, ancho, alto)
{
    var 
anchoVentana = ancho;
    var 
altoVentana  = alto;
    var 
izquierda = ((screen.width-anchoVentana)/2);
    var 
arriba    = ((screen.height-altoVentana)/2);
    
window.open(url, 'Enlace', 'width='+anchoVentana+',height='+altoVentana+ ',left=' + izquierda + ',top=' + arriba);
}

/*
 * Alinea el documento
 */
function alinear(opcion)
{
    switch(
opcion)
    {
        case 
"Justifycenter":
            
document.getElementById('edit').contentWindow.document.execCommand("Justifycenter", false, null);
            break;
        case 
"Justifyfull":
            
document.getElementById('edit').contentWindow.document.execCommand("Justifyfull", false, null);
            break;
        case 
"Justifyleft":
            
document.getElementById('edit').contentWindow.document.execCommand("Justifyleft", false, null);
            break;
        case 
"Justifyright":
            
document.getElementById('edit').contentWindow.document.execCommand("Justifyright", false, null);
            break;
        default: break;
    }
    
document.getElementById('edit').contentWindow.focus();
}

/*
 * Funciones de edicion
 */
function edicion(estilo) 
{ 
    switch(
estilo)
    {
        case 
"Paste":
            
document.getElementById('edit').contentWindow.document.execCommand("Paste", false, null);
            break;
        case 
"Copy":
            
document.getElementById('edit').contentWindow.document.execCommand("Copy", false, null);
            break;
        case 
"Cut":
            
document.getElementById('edit').contentWindow.document.execCommand("Cut", false, null);
            break;
        case 
"Undo":
            
document.getElementById('edit').contentWindow.document.execCommand("Undo", false, null);
            break;
        case 
"Redo":
            
document.getElementById('edit').contentWindow.document.execCommand("Redo", false, null);
            break;
        default: break;
    }
    
document.getElementById('edit').contentWindow.focus();
}

/*
 * Funciones de listas
 */
function listas(estilo) 
{ 
    switch(
estilo)
    {
        case 
"Insertorderedlist":
            
document.getElementById('edit').contentWindow.document.execCommand("Insertorderedlist", false, null);
            break;
        case 
"Insertunorderedlist":
            
document.getElementById('edit').contentWindow.document.execCommand("Insertunorderedlist", false, null);
            break;
        default: break;
    }
    
document.getElementById('edit').contentWindow.focus();
}

/*
 * Funciones de margen
 */
function margen(estilo) 
{ 
    switch(
estilo)
    {
        case 
"Outdent":
            
document.getElementById('edit').contentWindow.document.execCommand("Outdent", false, null);
            break;
        case 
"Indent":
            
document.getElementById('edit').contentWindow.document.execCommand("Indent", false, null);
            break;
        default: break;
    }
    
document.getElementById('edit').contentWindow.focus();
}

/*
 * Funciones de estilo de fuente
 */
function select(selectname)
{
    var 
cursel = document.getElementById(selectname).selectedIndex;
    if (
cursel != 0)
    {
        var 
selected = document.getElementById(selectname).options[cursel].value;
        
document.getElementById('edit').contentWindow.document.execCommand(selectname, false, selected);
        
document.getElementById(selectname).selectedIndex = 0;
    }
    
document.getElementById('edit').contentWindow.focus();
}

/*
 * Inserta una linea horizontal
 */
function linea()
{
    
document.getElementById('edit').contentWindow.document.execCommand("Inserthorizontalrule", false, null);
    
document.getElementById('edit').contentWindow.focus();
}

function 
codigo()
{
    var 
html = document.getElementById('edit').contentWindow.document.body.innerHTML;
    
document.enlace.HTML.value = html;
} 
Como ves tiene una licencia y hay que mantenerla y cumplirla

Saludos!
__________________
Usuario registrado de Linux #288725

Última edición por epplestun; 20/10/2003 a las 02:47