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

Text Editor

3 Answers 54 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Koren
Top achievements
Rank 1
Koren asked on 24 Oct 2010, 11:16 PM
Is it possible to use RadEditor as text editor? I want to use the toolbar capabilities for injecting content but I need the editor to produce text instead of HTML and maintain new lines etc.

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 25 Oct 2010, 08:13 AM
Hello Koren,

You can obtain the content of RadEditor as plain text along with new lines (/r/n) through the RadEditor1.Text property.

Please, note that the content area of RadEditor is an editable IFRAME and it does not offer the ability to edit plain text content only. Your users will be always able to paste or drag content with HTML formatting from another location and it will be rendered in Design mode.

Best regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Koren
Top achievements
Rank 1
answered on 25 Oct 2010, 10:20 AM
Thank you. I used the Text property to access the text and saved it in the DB. The problem is that when I need to re-edit the text I need to set the Content property which renders the text without "new lines" because the <br/> tags are not present. What do you suggest?
0
Rumen
Telerik team
answered on 25 Oct 2010, 10:46 AM
Hi Koren,

Since the new line /n character is not rendered in HTML environment and you should convert it to <br/> tag before loading it in RadEditor. e.g.

RadEditor1.Content = RadEditor1.Content.Replace("\n", "<br/>");

Best regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Editor
Asked by
Koren
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Koren
Top achievements
Rank 1
Share this question
or