Re: hitting enter causes <div>&nbsp;</div> to be added

  •  06-27-2010, 11:42 PM

    Re: hitting enter causes <div>&nbsp;</div> to be added

    Hi eatsubway,
     
    Two options
     
    1.  Add the HTML filter, try the below example
     
    1. <%@ Page Language="C#" %>   
    2.   
    3. <%@ Register Namespace="CuteEditor" Assembly="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>Untitled Page</title>   
    8. </head>   
    9. <body>   
    10.     <form id="form1" runat="server">   
    11.         <div>   
    12.             <CE:Editor ID="editor1" runat="server">   
    13.             </CE:Editor>   
    14.         </div>   
    15.     </form>   
    16. </body>   
    17. </html>   
    18.   
    19. <script>   
    20. function CuteEditor_FilterHTML(editor,code)   
    21. {   
    22.  return code.split("<div>&nbsp;</div>").join("");   
    23. }   
    24. function CuteEditor_FilterCode(editor,code)   
    25. {   
    26.  return code.split("<div>&nbsp;</div>").join("");   
    27. }   
    28. </script>  

    2. Use "BR" for the BreakElement
     
    <CE:Editor ID="editor1" runat="server" BreakElement="Br">
    </CE:Editor>
     
    Regards,
     
    ken
View Complete Thread