New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Style is inserted in text when deleting paragraph tag

Environment

Product Version2019.3.917
ProductRadEditor for ASP.NET AJAX

Description

These inline styles are applied by the Chrome/Safari browser as the parent page has some default decoration regarding the page's text.

Steps to Reproduce

Here are the steps to simulate:

  1. I have existing text in the editor which does not have any style formatting, e.g.

<p>line 1</p><p>line 2</p>

  1. Now put the cursor in the beginning of the second paragraph and hit backspace
  2. As you can see from the HTML view mode it now adds a tag with formatting

Solutions

For ContentAreaMode="iframe":

The following solution will clear out any CSS files or styles derived from the parent page and may server as a possible workaround:

ASP.NET
<telerik:RadEditor runat="server" ID="RadEditor1" ContentAreaMode="iframe">
    <CssFiles>
        <telerik:EditorCssFile Value="~/Empty.css" />
    </CssFiles>
</telerik:RadEditor>

For ContentAreaMode="div" or for the inline editor: Define a CSS class for the RadEditor div content area which applies a default font and color to the paragraphs:

CSS
.reContentArea p {
	font: 13px Arial !important;
	color: black;
}