One of the limitations of the RadEditor for MOSS feature is that it is unable to support object and embed tags when used as the replacement rich text editor in lists. I have come to the conclusion that this is actually a function of the underlying sharepoint field type. However, new, custom, field types are a reality in sharepoint development, and by simply using the default WSP builder template, I have created a custom field that does not suppress these tags. From there my natural instinct is to use the RadEditor for MOSS as the editor control; however, it doesn't have the necessary control properties exposed to do so. (no public content or text properties) Therefore, I'm attempting to use the standard RadEditor. This is perhaps more of a sharepoint question, but for anyone interested, after littering the code with debugging stops, the last method it leaves is the one below:
protected override void CreateChildControls()
{
if (Field == null) return;
base.CreateChildControls();
if (ControlMode == SPControlMode.Display)
ConstructDisplayMode();
else
{
ConstructEditMode();
if (ControlMode == SPControlMode.New)
{
OpenHTMLField field = (OpenHTMLField)base.Field;
}
}
}
I then see an 'unexpected error has occurred' and the Logs contain the following messages:
05/28/2012 16:15:56.08 w3wp.exe (0x0FE4) 0x17C8 CMS Publishing 8zug Medium PublishingHttpModule.Init() calling AppDomainUnloadListener.Register()
05/28/2012 16:15:56.08 w3wp.exe (0x0FE4) 0x17C8 CMS Publishing 8x0a High AppDomainUnloadListener.RegisterSelf() entered lock(this=34622967)
05/28/2012 16:15:56.08 w3wp.exe (0x0FE4) 0x17C8 CMS Publishing 8zug Medium PublishingHttpModule.Init() calling AppDomainUnloadListener.Register()
05/28/2012 16:15:56.08 w3wp.exe (0x0FE4) 0x17C8 CMS Publishing 8x0a High AppDomainUnloadListener.RegisterSelf() entered lock(this=34622967)
If I'm way out in left field with this I'd appreciate any advice.
8 Answers, 1 is accepted

private
void
ConstructEditMode()
{
rScriptManager =
new
RadScriptManager();
reOpenHTML =
new
RadEditor();
reOpenHTML.CssClass =
"ms-long"
;
this
.Controls.Add(rScriptManager);
this
.Controls.Add(reOpenHTML);
}
However, I'm now getting a message saying that the radScriptManager needs an HTTPModule Registration. Fair enough; however, I have this registration already:
<
add
verb
=
"GET,HEAD"
path
=
"ScriptResource.axd"
type
=
"System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
validate
=
"false"
/>
and I'm wondering if anyone knows if I'm going to run into a train putting one for the radScriptManager in there before this one.

<
add
verb
=
"*"
path
=
"Telerik.Web.UI.DialogHandler.axd"
type
=
"Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2012.1.411.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
/>
But I'm still getting the error:
Web.config registration missing!
The Telerik dialogs require a HttpHandler registration in the
web.config file. Please, use the control's Smart Tag to add the
handler automatically, or see the help for more information:
Controls > RadEditor > Dialogs > Introduction
Since I'm not really doing this from a design pane in VS, there's no way to use the smart tag is there? Also, some of the examples I picked up in different places on the forums seemed to show an entry with a name attribute in it which my web server didn't seem to care for. Is that an IIS 7.5 thing?

<
handlers
>
<
remove
name
=
"WebServiceHandlerFactory-Integrated"
/>
<
remove
name
=
"ScriptHandlerFactory"
/>
<
remove
name
=
"ScriptHandlerFactoryAppServices"
/>
<
remove
name
=
"ScriptResource"
/>
<
add
name
=
"Telerik_Web_UI_DialogHandler_aspx"
verb
=
"*"
preCondition
=
"integratedMode"
path
=
"Telerik.Web.UI.DialogHandler.aspx"
type
=
"Telerik.Web.UI.DialogHandler"
/>
<
add
name
=
"ScriptHandlerFactory"
verb
=
"*"
path
=
"*.asmx"
preCondition
=
"integratedMode"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
<
add
name
=
"ScriptHandlerFactoryAppServices"
verb
=
"*"
path
=
"*_AppService.axd"
preCondition
=
"integratedMode"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
<
add
name
=
"ScriptResource"
preCondition
=
"integratedMode"
verb
=
"GET,HEAD"
path
=
"ScriptResource.axd"
type
=
"System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
</
handlers
>
And I've got this in my httpHandlers section:
<
httpHandlers
>
<
remove
verb
=
"GET,HEAD,POST"
path
=
"*"
/>
<
add
verb
=
"GET,HEAD,POST"
path
=
"*"
type
=
"Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
/>
<
add
verb
=
"OPTIONS,PROPFIND,PUT,LOCK,UNLOCK,MOVE,COPY,GETLIB,PROPPATCH,MKCOL,DELETE,(GETSOURCE),(HEADSOURCE),(POSTSOURCE)"
path
=
"*"
type
=
"Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
/>
<
add
verb
=
"*"
path
=
"Reserved.ReportViewerWebControl.axd"
type
=
"Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
/>
<
add
verb
=
"*"
path
=
"_vti_bin/ReportServer"
type
=
"Microsoft.ReportingServices.SharePoint.Soap.RSProxyHttpHandler, RSSharePointSoapProxy, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
/>
<
add
verb
=
"*"
path
=
"Reserved.ReportViewerWebPart.axd"
type
=
"Microsoft.ReportingServices.SharePoint.UI.WebParts.WebPartHttpHandler, Microsoft.ReportingServices.SharePoint.UI.WebParts, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
/>
<
add
verb
=
"*"
path
=
"*.asmx"
validate
=
"false"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
<
add
verb
=
"*"
path
=
"*_AppService.axd"
validate
=
"false"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
<!--<add verb="*" path="Telerik.Web.UI.DialogHandler.axd" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2012.1.411.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />-->
<
add
path
=
"Telerik.Web.UI.DialogHandler.aspx"
verb
=
"*"
type
=
"Telerik.Web.UI.DialogHandler"
validate
=
"false"
/>
<
add
path
=
"Telerik.Web.UI.WebResource.axd"
verb
=
"*"
type
=
"Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2012.1.411.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
/>
<
add
verb
=
"GET,HEAD"
path
=
"ScriptResource.axd"
type
=
"System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
validate
=
"false"
/>
</
httpHandlers
>
And I'm still getting the registration error for dialogs.


~David
The dialog handlers of RadEditor for MOSS are physical files located in the \Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\5.X.XX.0__1f131a624888eeed\Resources folder, where 5.X.XX is the version of RadEditor for MOSS installed on the server:
Telerik.Web.UI.DialogHandler.aspx
Telerik.Web.UI.SpellCheckHandler.ashx
Telerik.Web.UI.WebResource.ashx
We do not recommend using the standard RadEditor for ASP.NET AJAX in SharePoint scenarios, because the especially designed RadEditor for MOSS / RadEditor for SharePoint 2010 automatically registers their handlers and have a special file browser content provider written to work with the SharePoint libraries. If you use the regular editor, you need to register and configure the handlers as well as write the file browser content provider yourself.
What you can do in regards to the Telerik.Web.UI.DialogHandler.aspx registration is to set the DialogHandlerUrl property of regular RadEditor to point to the Telerik.Web.UI.DialogHandler.axd file:
/_wpresources/RadEditorSharePoint/5.8.15.0__1f131a624888eeed/Resources/Telerik.Web.UI.DialogHandler.aspx"
For your convenience I have attached the Telerik.Web.UI.DialogHandler.aspx file.
Kind regards,
Rumen
the Telerik team

Incidentally, I suppose that doesn't automatically reference the version of the File Browser Content Provider I'm looking for though. The control I see is itself, still dead.
Would I be able to find the content provider used by radeditorMoss in the sourcecode .zip I can download?
~David
Yes, the SPContentProvider.cs file is available in the \Code\Editor folder in the source code of RadEditor for MOSS.
All the best,
Rumen
the Telerik team