display new line on report after saved with Editor

2 posts, 0 answers
  1. HL
    HL avatar
    55 posts
    Member since:
    Dec 2009

    Posted 27 Nov 2011 Link to this post

    Hi all:
    I use Radeditor to allow user to enter the text then save to database. User can view what they entered through Report
    Now the issue is that the <br/> didn't encrypt correctly and the text didn't display with new line. any suggestion?

    Example: I save two paragraph to database which entered through Editor.

    line 1 <br /><br /><br /><br />line 2 <br/ ><br /><br />

    After I display on the report, it supposed to be
    line 1
    line 2
    line 3

    but it displays line1line2line3

    Any suggestion?

    the code which I defined the Radeditor as below:




    <
    telerik:RadEditor ID="ProgressNoteEditor" Language="en-GB" AutoResizeHeight="true"  NewLineMode="Br" Height="150px" Runat="server" 
                                                                            ContentFilters="ConvertToXhtml,MozEmStrong" MaxTextLength="4000"  EditModes="Design" 
                                                                            SkinID=""  Width="100%"  ToolsFile="~/configurationFile/BasicEditTool.xml"  StripFormattingOptions="AllExceptNewLines"
                                                                          >
                                                                           <CssFiles>
                                                                               <telerik:EditorCssFile Value="~/StyleSheets/RadEditorEditArea.css" />
                                                                          </CssFiles>
                                                      <ContextMenus>
                                                              <telerik:EditorContextMenu TagName="P">
                                                                  <telerik:EditorTool Name="Cut" />
                                                                    <telerik:EditorTool Name="Copy" />
                                                                    <telerik:EditorTool Name="Paste" /> 
                                                              </telerik:EditorContextMenu>     
                                                                    <telerik:EditorContextMenu TagName="BODY">
                                                                  <telerik:EditorTool Name="Cut" />
                                                                    <telerik:EditorTool Name="Copy" />
                                                                    <telerik:EditorTool Name="Paste" /> 
                                                              </telerik:EditorContextMenu>  
                                                           </ContextMenus>
                                                           </telerik:RadEditor>

    Thanks
    Helena

  2. HL
    HL avatar
    55 posts
    Member since:
    Dec 2009

    Posted 29 Nov 2011 Link to this post

    I figured out the issue. Just in case someone got the same issue, I posted what I changed. Basically I can't set to
    ConvertToXhtml inside the ContentFilters on RadEditor. Otherwise the new line will save to database as <br  /> instead of <br>
     After I removed ConvertToXhtml setting, it works perfect

    <telerik:RadEditor ID="ProgressNoteEditor" Language="en-GB" AutoResizeHeight="true" 
    NewLineMode="Br" Height="150px" Runat="server"        
    ContentFilters="MozEmStrong" MaxTextLength="4000"  EditModes="Design"  
    Width="100%"  ToolsFile="~/configurationFile/BasicEditTool.xml"  StripFormattingOptions="AllExceptNewLines" >
Back to Top