DESCRIPTION
Here is some general info on how the browser works with <BR> and <P> tags.
Carriage returns (when pressing Enter) are not significant when it comes to HTML. It doesn't matter what is the amount of whitespace in the HTML code - it is automatically converted to a single space when your HTML document is displayed in a browser. For an example, if you put in your HTML file the following text:
Introducing Telerik RadEditor v7.0.
Improved user experience. Enhanced cross-browser support.
In the browser it will be displayed as a single line (empty spaces and carriage returns are being converted to a single whitespace):
Introducing Telerik RadEditor v7.0. Improved user experience. Enhanced cross-browser support.
If you wish to enter line breaks, e.g. you want your text to be displayed on two or more lines, but not to start a new paragraph, you should use a <BR> tag. For an example:
Introducing Telerik RadEditor v7.0.<BR>Improved user experience.<BR>Enhanced cross-browser support.
is displayed in the browser as:
Introducing Telerik RadEditor v7.0.
Improved user experience.
Enhanced cross-browser support.
 |
Note that the <BR> tag is an empty tag and has no closing tag. |
If you want to start a new paragraph, you should use the <P> (paragraph) tag. In HTML, this means automatically adding an extra blank line before and after a paragraph. e.g.:
<p>Introducing Telerik RadEditor v7.0.</p>
<p>Improved user experience.</p>
<p>Enhanced cross-browser support.</p>
is displayed as:
Introducing Telerik RadEditor v7.0.
Improved user experience.
Enhanced cross-browser support.
 |
In a nutshell, if you want to end a line, but don't want to start a new paragraph, use <BR> tag. If you wish to start a new paragraph - you use the <P> tag. |
SOLUTION
Telerik RadEditor's NewLineBr property specifies whether the editor should insert a new line (<BR> tag) or a new paragraph (<P> tag) when the Enter key is pressed. The default value is true (<BR> tag) in order to closely reflect the behavior of desktop word-processors. In this case you can insert paragraph tags by pressing Ctrl+M or the New Paragraph button.
If you set the NewLineBr property to false, a paragraph tag will be entered on every carriage return (pressing Enter). Here, pressing Shift+Enter will insert a <BR> tag.
Working with bulleted/ numbered lists in Telerik RadEditor
Lists are types of paragraphs and they accept the same attributes as paragraph tags. This means that whenever you insert a list in your HTML, you insert a new paragraph. Since Telerik RadEditor v5.05 the NewLineBr mechanism has been improved. However this makes it impossible for example to start bulleted/numbered list with the line being blank.
Workarounds:
- Set the NewLineBr property to false. In this case when you press Enter, a <P> tag will be inserted. If you wish to use line break (<BR> tag), you can press Shift+Enter.
- Use the following approach:
- press Space
- press the Bullet / Numbered list button.
- press Backspace to delete the initially entered blank space and continue writing your list.