Update for this issue. It seems that the isPostBack is returning false which is causing the html content to not be saved. If you refresh the page it tries to do the save again and sometimes will save. So far the most reliable work around has been to switch from the normal view to the HTML view and then save.
protected void Page_Load(object sender, EventArgs e)
{
// Update or retrieve the record
string htmlContent = "";
if (this.IsPostBack)
{
htmlContent = cm_htmlcontent.Text;
DoValidation(htmlContent);
this.ClientConnection.CrmConnection.UpdateHtmlContent(this.CrmRecordId, this.CrmRecordType, htmlContent);
}
else
{
htmlContent = GetHtmlContentFromDatabase();
}
DoStuff();
ConfigureEditor();
// Bind data to control
cm_htmlcontent.Text = htmlContent;
}
Above is a simplified version of the serverside code. So the html content that is being edited is stored inside a var cm_htmlcontent. The only time we pull from that is "
if (this.IsPostBack)" When the problem occurs it seems to be skilling the "
if (this.IsPostBack)" segment and going straight to the else segment which pulls the htmlContent that was last saved and ends by putting that original htmlContent back on screen effectively erasing any changes made by the user.