I try to use the RADEditor in a SharePoint PageLayout as a substiture for the PublishingWebControls:RichHtmlField.
First I tried to use telerik:RadHtmlField instead of the default MOSS-Tag. But I want to set my own, individual (dynamical) paths for the Editor's ImageManager, DocumentManager, etc. so I can't use the config-file. As a matter of this, I created my own class which has Telerik.SharePoint.FieldEditor.RadHtmlField as base-class and a public method that returns the radEditorControl:
| public class SLRADHtmlField : Telerik.SharePoint.FieldEditor.RadHtmlField
| public MOSSRadEditor GetMOSSRADEditorControl()
| return radEditorControl;
Now I can replace <telerik:RadHtmlField id="..." FieldName="Resolution".../> by my own tag <sl:SLRadHtmlField id="..." FieldName="Resolution".../>
In the overridden OnLoadComplete-Method in my CodeBehind-Class now I have access to the RadEditor-Control by using the following code:
|MOSSRadEditor RadEditor = SLRADHtmlField.GetMOSSRADEditorControl();
After this, I can modify ImageManager-settings and so on...
First trying seemed to be successful, the entered text was saved after submitting. So I tried some little more like formatting in bold, italic, underline. That was successfully too.. partial. The underline-style was not saved. After that, I tried to insert an image. Adding the image to the editor-field was successful too but after saving, the image was gone.
I had a look to the html-tab in the editor and both, the <span>-tag for the underlining and the <img>-tag were removed.
After a lot of googling and reading other threads in this forum, I found this page about contentfilters
. Now I added this line to my code:
|RadEditor.ContentFilters = EditorFilters.None;
It prevents that the underline-tag is stored as <span> but remains as <u>-tag.
This solved the problem with the disappearing underline but not with the disappearing <img>-tag.
It seems that some special tags (like <span> or <img>) are stripped out completely but I haven't looked yet which other tags are also removed.
Meanwhile I don't have any ideas no more...
Could you please give me some guidance?
I installed the radeditormoss.wsp and added references in my Visual Studio project to the RadEditorSharePoint.dll Version 18.104.22.168 and because of that to the Telerik.Web.UI.dll Version 2009.2.826.20.
Greetings from Germany,