Completed
Last Updated: 16 Mar 2015 08:17 by ADMIN
ADMIN
Slav
Created on: 10 Dec 2013 13:27
Category: Editor
Type: Bug Report
0
RadEditor with NewLineMode set to Div wraps text in a paragraph element when the text is entered in an empty content area under Chrome and IE11
When the NewLineMode of a RadEditor is set to Div and a line of text is entered in an empty content area of the control under Chrome, the text will be wrapped in a paragraph element.

Possible workaround is to set an initial content with a DIV and BR elements inside:

<telerik:RadEditor runat="server" ID="RadEditor1" NewLineMode="Div">
    <Content>
        <div></div>
    </Content>
</telerik:RadEditor>

Another possible solution is incorporating the following JS code right after the RadEditor declaration:

<telerik:RadEditor runat="server" ID="RadEditor1" NewLineMode="Div">
</telerik:RadEditor>

<script type="text/javascript">
	Telerik.Web.UI.RadEditor.prototype._onKeyPressed = function (e) {

	}
</script>
2 comments
ADMIN
Ianko
Posted on: 30 Jun 2014 07:22
Hi Sean, 

The suggested solution works only for the current visualization of the paragraph. If the content is exported somehow, the paragraph would still exist. 
Sean
Posted on: 05 Jun 2014 19:27
The workaround I'm using is attaching a Css file via RadEditor->CssFiles->EditorCssFile with contents as follows:

p {
	margin: 0px 0px 0px 0px;
}