OK - Valid question re: CuteEditor_FilterHTML

  •  01-26-2009, 11:59 PM

    OK - Valid question re: CuteEditor_FilterHTML

    Hi
     
    failing to get an answer to http://cutesoft.net/forums/thread/47996.aspx, I decided to try another approach...
     
    function CuteEditor_FilterHTML(editor,code)
                {
                 
                    code = code.replace(/font-family:.*?>/ig, 'font-family: "Arial">');
                    code = code.replace(/font-size:.*?pt/ig, 'font-size: 12px');
                    return code;
                    
                   
                }

    I simply want to control font face and size especially if pasted from MS Word, so this works.... almost. The filtering is done correctly, but the visual display remains the same. In other words, if I paste in text from Word with 'Comic Sans MS' font face, the underlying html text is changed correctly, but not displayed correctly until the page is reloaded.
    How do I refresh the editor after the filter is applied?

    any ideas...


    Thanks


View Complete Thread