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

Setting RadEditor content - format stripped

1 Answer 35 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 2
Bill asked on 08 Sep 2008, 08:01 PM
Loading data from an oracle CLOB into the rad editor - the clob contains plain text with formatting in the form of spaces and line feeds.

Code that assigns the content:
rePageEditor.Content = (String)((DataRow)dt.Rows[0])["CLOB_DATA"];

The problem is that when the editor displays the text, ALL of the existing text formatting is gone...

How do I load this type of text data into the radeditor without losing all of the existing text formatting?  The data is coming from an old system - if some html should be added during the migration that could be easily done.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 09 Sep 2008, 07:52 AM
Hi Bill,

RadEditor is an HTML editor and it can work and render pure HTML only. The line feeds and new lines are not HTML tags and they cannot be rendered by the browser. You need to replace with String.Replace() the line feeds with the respective valid HTML tags before loading the content via the Content property in the editor.

All the best,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Bill
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Share this question
or