Sharepoint has own default editor for RichTextField. However if you are not satisfied with the functionality offered by this html editor, there are several other implementations available from other vendors. One of the popular editors for Sharepoint is Telerik Rad Editor Lite. Advantage of this control is that it is free (it was developed by Telerik using agreement with MS). However it works only in IE and according to information from forums from Telerik site there are no plans to support other browsers in free version.
The good news is that even if it is not officially supported it is still possible to show Rad Editor in other than IE browsers (there is not guarantee that all features will work properly in this case, but most of basic features work). We will need little reflection and knowledge of how rendering templates work in Sharepoint.
At first lets check from where problem comes. If you investigate code of RadHtmlListField in Reflector (from RadEditorSharePoint.dll), you will find that it has the following hierarchy:
RadEditor > MOSSRadEditor > RadHtmlListField
RadHtmlListField has property IsSupportedBrowser:
If you will check another class RadEditorRenderer you will find that this property is used in order to determine will Rad Editor will be rendered as html editor or as text area without any toolbars:
(see line 12). Let’s check how Rad Editor determines browser capabilities. The logic is implemented in CheckBrowserCapabilities() method which is called from IsSupportedBrowser property (see above):
This method is the root of all problems. When you use last version of FireFox (I used FF 8) request.Browser contains “Firefox” and user agent contains “2 mozilla/5.0 (windows nt 5.2; rv:8.0) gecko/20100101 firefox/8.0”. In older FF versions (I tested with 3.6) Rad Editor worked – so it passed another values in specified fields (I didn’t check what exact values before to update it to version 8).
Now when we know the problem let’s find solution. We need to check if browser is Firefox and if yes set _isSupportedBrowser field to true. This field is private so we can’t just inherit the RadHtmlListField class and modify it. We need to use reflection. I created the following helper class:
It is also worth to make RadEditorList.ascx read only so when “Use RadEditor to edit list items” will be activated next time it won’t override your version. Code which copies file is inside try/catch block so it won’t fail feature activation and site creation if it is stapled with this feature.
After you will perform iisreset Sharepoint will use your own control and those will display Rad Editor in FireFox. If you will have similar problems with another browsers you can fix them by the same way.