Re: Big problem with images styled to 100% width when within table in IE8

  •  08-20-2012, 3:37 AM

    Re: Big problem with images styled to 100% width when within table in IE8

    Hi Bloodcarver,

    I suggest you try the example below. It will keep the doctype setting and remove the html/head/body target. Then you can keep use the doctype and not allow the user edit the complete document.

    1. <%@ Page Language="C#" %>  
    2.   
    3. <%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    5. <html xmlns="http://www.w3.org/1999/xhtml">  
    6. <head id="Head1" runat="server">  
    7.     <title>example</title>  
    8. </head>  
    9. <body>  
    10.     <form id="form1" runat="server">  
    11.         <CE:Editor ID="editor1" runat="server" EditCompleteDocument="true" DOCTYPE='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.gg.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'>  
    12.         </CE:Editor>  
    13.     </form>  
    14. </body>  
    15. </html>  
    16.   
    17. <script>  
    18. function CuteEditor_FilterHTML(editor,code)     
    19. {     
    20.     code=code.replace(/(<html[^\>]*\>)([\s\S]*)(\<\/html\>)/ig, "$2");     
    21.     code=code.replace(/(<head[^\>]*\>)([\s\S]*)(\<\/head\>)/ig, "$2");     
    22.     code=code.replace(/(<body[^\>]*\>)([\s\S]*)(\<\/body\>)/ig, "$2");     
    23.     return code;  
    24. }     
    25. function CuteEditor_FilterCode(editor,code)     
    26. {     
    27.     code=code.replace(/(<html[^\>]*\>)([\s\S]*)(\<\/html\>)/ig, "$2");     
    28.     code=code.replace(/(<head[^\>]*\>)([\s\S]*)(\<\/head\>)/ig, "$2");     
    29.     code=code.replace(/(<body[^\>]*\>)([\s\S]*)(\<\/body\>)/ig, "$2");     
    30.     return code;    
    31. }     
    32. </script>  
    Regards,

    Ken 

     

     

View Complete Thread