This is a migrated thread and some comments may be shown as answers.

display new line on report after saved with Editor

1 Answer 59 Views
Editor
This is a migrated thread and some comments may be shown as answers.
HL
Top achievements
Rank 1
HL asked on 28 Nov 2011, 04:55 AM

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

1 Answer, 1 is accepted

Sort by
0
HL
Top achievements
Rank 1
answered on 29 Nov 2011, 05:37 PM
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" >
Tags
Editor
Asked by
HL
Top achievements
Rank 1
Answers by
HL
Top achievements
Rank 1
Share this question
or