Is there a way to make the RadEditor insert <br /> instead of <p> tags when the user presses the Enter key.
1 Answer, 1 is accepted
answered on 16 Jun 2011, 02:10 PM
Are you using the Silverlight/WPF RadRichTextBox with HtmlFormatProvider? If that is the case, you cannot customize the output in such a way without making any changes in the provider itself or implementing a new format provider.
By default, new paragraphs are created when you hit enter and line breaks when you press Shift+Enter. The new paragraphs are exported with the <p> tag, whereas the line breaks are exported as <br /> inside the paragraph.
Since the exported HTML conforms to XHTML, you can load the string with XML reader and change the exported document. If you need, we can also send you the source code of the format provider, so that you can adjust the export. However, if you will be loading the exported HTML in RadRichTextBox at a later time, changing the export in this way will not a very good idea, as the whole document will be split in one or two paragraphs and this will cause performance issues.
All the best,
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.