changing the DHTML editor

Hi, The client wants to use different sized DHTML editors. I'm aware that there is a global setting in Episerver where you can specify the height and width for *all* the DHTML editors. So I've managed to create a custom property using this DHTML editor (not sure this there is a simpler way?). I've managed to set the size of the editor, but I'm not able to "store" the value when pressing the "save and view" or "save and publish" button, because of this error : >> Control 'custom_editor' referenced by the ControlToValidate property of 'ParseValidator-custom_editor' cannot >>be validated. Any help or recommendation would really be appreciated! Please see code below: editorHere = new PlaceHolder(); editorHere.ID = "custom_editor"; pls = new PropertyLongString(); pls.EditorSettings = EPiServer.SystemControls.EditorOption.All; pls.CreateChildControls("edit", editorHere); for (int i=0; i < editorHere.Controls.Count; i++) { if (editorHere.Controls[i].ToString() == "EPiServer.Editor.HtmlEditor") { EPiServer.Editor.HtmlEditor ed = (EPiServer.Editor.HtmlEditor)editorHere.Controls[i]; ed.Height = 150; if (base.Value != null) ed.Text = base.Value.ToString(); } } CopyWebAttributes( Container, editorHere); Container.Controls.Add( editorHere ); Container.Controls.Add( CreateParseValidator( editorHere ) ); // this is where I'm not sure what to Thanks ! Danie
Mar 16, 2006 14:51
hi, I've found the problem. Should have passed the HTMLeditor to the CreateParseValidator function. >> Container.Controls.Add( CreateParseValidator( ed ) );
Mar 17, 2006 9:36
* 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.