Using editor on page

Vote:
 

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)
{
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"));
}
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?
 

 

 

 

 

 

 

#48965
Feb 24, 2011 15:43
Vote:
 

Thx Linus

Changing:
PropertyLongString longString = new PropertyLongString();

To:
PropertyXhtmlString longString = new PropertyXhtmlString();

Was just enough

#48967
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.