| Glen Wells 2004-11-03, 5:49 pm |
| ....
using Telerik.WebControls;
....
namespace MyCompany.ContentManagement.Placeholders
{
public sealed class HtmlPlaceholderControl : RadEditorPlaceHolderControl
{
public HtmlPlaceholderControl()
{
// MODIFY PROPERTY DEFAULTS WE DON'T LIKE
this.AllowSpecialTags = true;
this.DefaultHtml = String.Empty;
this.RenderAsXhtml = true;
this.ShowHtmlMode = true;
this.ToolsWidth = new Unit("");
this.UseWordDictionary = false;
}
protected override void
LoadPlaceholderContentForAuthoring(Place
holderControlEventArgs e)
{
base.LoadPlaceholderContentForAuthoring(e);
// CLEAN UP HTML HERE IF REQUIRED
}
protected override void OnSavedContent(PlaceholderControlSaveEve
ntArgs e)
{
// READ OUT HTML
base.OnSavedContent (e);
HtmlPlaceholder p = (HtmlPlaceholder) BoundPlaceholder;
string html = p.Html;
// CLEAN UP HTML HERE IF REQUIRED
// WRITE BACK HTML
p.Html = html;
}
}
}
Hope this helps.
--
Glen Wells
www.cubik.co.uk
"Vivek" <anonymous@discussions.microsoft.com> wrote in message
news:129901c4c0fd$c39d6eb0$a501280a@phx.gbl...
>
> Anynoe have a sample code of a custom server
> control placeholder that implements the
> radeditorplaceholder?
>
|