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

RadEditor Content

2 Answers 142 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 11 Jun 2015, 01:07 PM

HI Telerik

 I have htmlEcoded data coming from an external source. 

If I set the radeditor's content to this htmlEncoded data, it doesn't display properly. If I htmldecode this data and then set it to radeditor's content... it displays properly..

Can you pls explain why it is so. Also is it ok to htmldecode data and display in editor.

Please reply..

Thanks,

Nick.

2 Answers, 1 is accepted

Sort by
0
Accepted
Ianko
Telerik team
answered on 16 Jun 2015, 05:43 AM
Hello Nick,

RadEditor is a text editor based on HTML, thus, you need proper HTML in order for the text to be rendered properly. When it is encoded, it is transformed to plain text, and it is no more markup that can be rendered by the browser. RadEditor has no capabilities to programmatically  capture and decode encoded HTML, moreover such behavior would be inappropriate.

In order to properly add content to the editor, you should make sure it is proper HTML, therefore, when programmatically adding encoded HTML, you should first decode it.

Regards,
Ianko
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Nick
Top achievements
Rank 1
answered on 18 Jun 2015, 01:40 AM

Thank you very much.  

I appreciate your response

Nick.

Tags
Editor
Asked by
Nick
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Nick
Top achievements
Rank 1
Share this question
or