Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Using editor on page


How do I get the editor to work on a page?


In CMS 5 I used this in apsx:
<EPiServer:Property id="myHtmlEditor" Width="650" height="350" EditMode="true" runat="server" />


And this on cs:
override void OnInit(EventArgs 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"));
"episerverscriptmanager.js", ((PageBase)Page).ResolveUrlFromUtil("javascript/EPiServerScriptManager.js"));
PropertyLongString longString = new PropertyLongString();
// select chosen options or use EditorToolOption.All


longString.EditorToolOptions = EditorToolOption.All;
longString.Name = "MyLongStringProperty";
myHtmlEditor.InnerProperty = longString;





But when using the exact same code in CMS 6 I only get an empty TextBox with no ToolBox.

Is there any settings needed to be done?







Feb 24, 2011 15:43

Thx Linus

PropertyLongString longString = new PropertyLongString();

PropertyXhtmlString longString = new PropertyXhtmlString();

Was just enough

Feb 24, 2011 16:58
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.