Hi Mike,
Blow is a sample code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Telerik.Cms.Web.UI;
using Telerik.Web.UI;
/// <summary>
/// Summary description for RadEditorSelector
/// </summary>
public class RadEditorSelector : WebUITypeEditor<String>
{
public RadEditorSelector()
{
}
public override string Value
{
get
{
if(!String.IsNullOrEmpty(editor.Content.ToString()))
return (string)editor.Content;
return _value;
}
set
{
this._value = value;
}
}
protected override void CreateChildControls()
{
base.CreateChildControls();
ControlWithCustomDesigner c = new ControlWithCustomDesigner();
editor = new RadEditor();
editor.ToolsFile = "~/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml";
Controls.Add(editor);
string editorContent = this.editor.Content;
if (String.IsNullOrEmpty(Value))
this.Value = editor.Content.ToString();
this.Value = c.RadEditiorDialogValue;
editor.Content = this.Value;
}
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
}
private RadEditor editor;
private string _value;
}
Note that you should create a template for the custom WebEditor and make control reference to the RadEdtior control that has to be declared in the template.
Best wishes,
Ivan Dimitrov
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items.