I'm still having problems with this - I also need to render the editor to an htmlwriter (for adding to an XML file to be displayed via XSLT) but when I do it does not seem to initialise properly - the javascript is incomplete, giving me a CuteEditorClientClass is undefined error in the page (in IE)
In IE the editor appears but without about half of it's buttons, in firefox all of the buttons appear but some of the functions are undefined.
I'm guessing that I need to set the browser information somewhere so that the control knows which javascript to write, or I need to make it initialise in some way - any ideas?
The code that I am using looks like this:
void
Page_Load(object sender, System.EventArgs e){
StringBuilder ceBuilder = new StringBuilder();
StringWriter ceStringWriter = new StringWriter(ceBuilder);
HtmlTextWriter ceTextWriter = new HtmlTextWriter(ceStringWriter);
PlaceHolder ceHolder = new PlaceHolder();
ceHolder.Page = this;
CuteEditor.Editor ce = new CuteEditor.Editor();
ce.ID = "editor1";
ce.EditorWysiwygModeCss = "/editor/example.css";
int tc = ce.ToolControls.Count; //without this line the RenderControl method falls over (undefined object)
ce.Text = "hi";
ceHolder.Controls.Add(ce);
ceHolder.RenderControl(ceTextWriter);
Response.Write(ceBuilder.ToString());
}