my javascript sucks - anyone know how to do this please

  •  02-27-2009, 1:15 AM

    my javascript sucks - anyone know how to do this please

    Hi all
     
    I have an unresolved issue that's driving me nuts with code that works in IE, but not in Firefox. In a nutshell I'm catching pasted text to manipulate MS Word 2007 elements which cute editor does not do correctly, so I check for the paste command in CuteEditor_OnCommand, if its IE, I retreive the pasted text and run a custom function to clean the text further and all works good, but this does not work at all in FF. How do I duplicate the first three lines of this code for FF.
     
               
                          var rng = null;
                          rng = document.selection.createRange();
                          rng.execCommand("Paste");
                         
     
                          var sHTML = editor.getHTML();
                          editor.setHTML(cleanWordPaste(sHTML));
        
     
     
    Adam has had a number of attempts at answering this but none of his solutions worked,
    would really appreciate help if anyone knows how to do it.
     
     
    Thanks in advance...
View Complete Thread