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

RadEditor blank on refresh

1 Answer 100 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 26 Aug 2010, 05:21 PM
I am using some custom javascript to autosave the contents of a RadEditor. This is working fine and well, but if a user refreshes the page, the RadEditor reverts to what it looked like before it was edited.  Looking in the Page_Load function everything is correct, and the new value is being set to the RadEditor1.Content, but it seems like after Page_Load RadEditor is doing some magic that reverts it back to its original state.  Any suggestions?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 30 Aug 2010, 09:40 AM
Hi Nick,

Your problem is more likely related to overriding the editor content yourself, in your Page_Load method. Please note that if you read the content of the editor in an event handler (such as a button event handler) this event handler executes later in the page lifecycle compared to Page_Load. This is why, in case you set the initial content in Page_Load it is mandatory to add a check, e.g.

if (!Page.IsPostBack)
{
    RadEditor1.Content = "Some content";
}

In case you are having any difficulty, our suggestion is to implement your scenario using a simple <asp:TextBox> instead of RadEditor. Once you get the textbox to work as needed, all you need to do is change the textbox to RadEditor - and all should be fine.

In case you are able to implement your scenario with a simple <asp:TextBox>, yet you are facing trouble with the RadEditor, please send us your working project in a support ticket and we will make the change for you.

All the best,
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
Nick
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or