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

Last post 06-27-2010, 11:42 PM by Kenneth. 4 replies.
Sort Posts: Previous Next
  •  02-04-2010, 3:31 PM 58539

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

    Hitting enter causes <div>&nbsp;</div> to be added.  This causes an issues when creating custom emails with the editor.  It causesa symbol to be inserted into the email when sent (A with an accent above).  Is there any way around this?
     
    Thanks
  •  02-04-2010, 4:40 PM 58541 in reply to 58539

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

    Which version are you using?
     
    Which browser are you using?
     
    Please try this example:
     
     
    Keep me posted

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  02-05-2010, 8:37 AM 58547 in reply to 58541

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

    Hi Adam,
     
      I am using the latest version and this occurs in both Firefox (3.5.7), IE 7 and IE 8.  I also tried it in your example and the <div>&nbsp;</div> was added each time I pressed enter.
  •  06-25-2010, 3:01 PM 62007 in reply to 58539

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

    Adam,
     
    I am struggling with the same problem, has there been a fix to this issue?  please give an update. thanks
  •  06-27-2010, 11:42 PM 62023 in reply to 62007

    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 as RSS news feed in XML