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

Adding multiple lines of text in a textarea in a table indents the text

1 Answer 315 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Erwin
Top achievements
Rank 1
Erwin asked on 02 Feb 2010, 12:28 PM
Repro:

  1. Use Internet Explorer 8
  2. Add a table with 1 cell
  3. In this cell, add a textarea
    At this moment the html should look like this
    <table> 
        <tbody> 
            <tr> 
                <td><textarea style="width: 223px; height: 76px;" rows="4" cols="24"></textarea> </td> 
            </tr> 
        </tbody> 
    </table> 
  4. Doubleclick on the textarea, and add "Line 1" <ENTER> "Line 2"
  5. Now when you save or switch between Design <-> HTML, the second line becomes indented.

Is there a way to circumvent the spaces automatically added by the editor?

Kind regards,
Dries

1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 05 Feb 2010, 12:44 PM
Hi Dries,

The reason for this behavior is that white-space characters (space, newline, etc) inside a TEXTAREA are treated as they are (not like in HTML - multiple spaces are displayed as one) and RadEditor has a built-in filter IndentHTMLContent that inserts white spaces to make the HTML more readable in HTML View mode.

You can disable this filter with the following code:
RadEditor1.DisableFilter(Telerik.Web.UI.EditorFilters.IndentHTMLContent);

You can find more information about the built-in content filters in the following article:
Content Filters

I hope this information helps.

Greetings,
Dobromir
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
Editor
Asked by
Erwin
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or