Microsoft Content Management Server - Radeditorplaceholder

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > November 2004 > Radeditorplaceholder





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Radeditorplaceholder
Vivek

2004-11-02, 5:50 pm


Anynoe have a sample code of a custom server
control placeholder that implements the
radeditorplaceholder?

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?
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com