Try our conversational search powered by Generative AI!

Ajax and Editor on Page

Vote:
 

Got another issue when using the TinyMCE editor on a page.

When using Ajax and a control is Postbacking the editor turns into a normal textbox.

protected overridevoid OnInit(EventArgs e)
{
base.OnInit(e);
if (!Page.ClientScript.IsClientScriptIncludeRegistered("system.js"))
{
   Page.ClientScript.RegisterClientScriptInclude("system.js", ((PageBase)Page).ResolveUrlFromUI("javascript/system.js"));
   Page.ClientScript.RegisterClientScriptInclude("system.aspx", ((PageBase)Page).ResolveUrlFromUI("javascript/system.aspx"));
   Page.ClientScript.RegisterClientScriptInclude("episerverscriptmanager.js", ((PageBase)Page).ResolveUrlFromUtil("javascript/EPiServerScriptManager.js"));
}
PropertyXhtmlString xhtmlString = newPropertyXhtmlString();
// select chosen options or use EditorToolOption.All
// EditorToolOption.Bold | EditorToolOption.Italic | EditorToolOption.Underline;
xhtmlString.EditorToolOptions = EditorToolOption.All;
xhtmlString.Name = "MyLongStringProperty";
HtmlEditor.InnerProperty = xhtmlString;
}

Any ideas?

#49760
Mar 30, 2011 15:10
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.