Carriage Return / Line Break with <br>

Last post 06-14-2011, 8:16 AM by EricR. 6 replies.
Sort Posts: Previous Next
  •  06-09-2011, 12:44 PM 67885

    Carriage Return / Line Break with <br>

    I've been searching for how to disable some text being added into the editor.  When hitting enter, I have changed it to add a <br> instead of a <p> or what have you.  I'm looking to remove the \r\n (linebreak carriage return) from in front of the <br> tag.
     
    Any help would be greatly appreciated.
  •  06-09-2011, 10:45 PM 67889 in reply to 67885

    Re: Carriage Return / Line Break with <br>

    Hi EricR,
     
    Please refer to http://cutesoft.net/asp/oncarriagereturn.asp.
     
    you can defines what happens when the "enter" key is pressed in the editor in the BreakElement property.
    Regards,
     
    ken
  •  06-10-2011, 7:55 AM 67896 in reply to 67889

    Re: Carriage Return / Line Break with <br>

    As mentioned, I've already changed it from <p> to <br>, so I am using the BreakElement Property.  However, in the actual HTML that is returned from getHTML() returns \r\n<br/> where you have hit enter in the HTML.  I would like it to return just <br/> and not \r\n<br/>.
  •  06-10-2011, 1:16 PM 67902 in reply to 67896

    Re: Carriage Return / Line Break with <br>

    Hi EricR,
     
    Please open http://cutesoft.net/asp/oncarriagereturn.asp, you can choose "Br" and then test it,  it returns <br /> instead of "\r\n<br/>".
     
    Can you try this online demo?
     
    If you cannot reproduce it in our online demo, you can check whether you are using latest version.
     
    You can refer to http://cutesoft.net/forums/thread/63660.aspx and detect the product version.
     
    Thanks for asking
  •  06-13-2011, 8:29 AM 67926 in reply to 67902

    Re: Carriage Return / Line Break with <br>

    Thank you for the response.  Basic examples like that work just fine it would seem.  However, when I enter in html like
    <area onmouseover="Tip('<strong>Headquarters</strong><br/>5555 Pleasentville Drive<br/>Carthage, TX 66666<br/><br/><strong>Texas, Carthage</strong><br/>1111 Crimsondale Park Road<br/>Carthage, TX 66666',200,'left');
    >" using the Editor.Text property.  Then, once I use
    var editor1 = document.getElementById('<%= Editor1.ClientID%>');                   
    if (editor1)
    {                     return editor1.getHTML();                 }
    to retrieve the text.  The text is reformatted as
    <area onmouseover=\"Tip('<strong>Headquarters</strong><br/>\r\n5555 Pleasentville Drive<br/>\r\nCarthage, TX 66666<br/>\r\n<br/>\r\n<strong>Texas, Carthage</strong><br/>\r\n1111 Crimsondale Park Road<br/>\r\nCarthage, TX 66666',200,'left');\" body <>
     
    Any help would be greatly appreciated.
  •  06-14-2011, 1:23 AM 67944 in reply to 67926

    Re: Carriage Return / Line Break with <br>

    Hi EricR,
     
    You code like that you are using the asp.net version of editor right?
     
    Can you show me your full test html code which you input into CuteEditor? The code above like that can not be test directly.
     
    What I mean is
     
    <area onmouseover="Tip('<strong>Headquarters</strong><br/>5555 Pleasentville Drive<br/>Carthage, TX 66666<br/><br/><strong>Texas, Carthage</strong><br/>1111 Crimsondale Park Road<br/>Carthage, TX 66666',200,'left');
    >
     
     
    Keep me posted.
     
    Regards,
     
    ken
  •  06-14-2011, 8:16 AM 67951 in reply to 67944

    Re: Carriage Return / Line Break with <br>

    <map name="USAMap"><area onmouseover="Tip('<strong>Headquarters</strong><br/>5233 Coye Drive<br/>Stevens Point, WI 54481<br/><br/><strong>Wisconsin, Stevens Point</strong><br/>4500 Industrial Park Road<br/>Stevens Point, WI 54481',200,'left');"></map><input id="image1" border="0" value="Legend" align="bottom" src="http://www.google.com/images/logos/ps_logo2.png" width="155" height="125" type="image" name="Legend" />
    Is an example.  This is a non working example because it's not the same image that will actually be used.  (one that I cannot give out).  Hopefully you can try this out and see that it's adding the \r\n characters.
View as RSS news feed in XML