Making Sense of the SharePoint World


Cross-browser Rich Text Editing and More in SharePoint

Dec-82008

MCj04136380000[1]"It's not just for Firefox anymore"

Today I'm going to talk about one of the earliest enhancements that was available for the current release of SharePoint. It has been around for so long, that it has either fallen off folks' radar, or has never made it onto the screen for newer users. That's a little sad, because it has always been a very useful component, and in its latest release is even more so. What is this magic add-on? The Telerik RadEditor Lite.

Considering the complexity of the markup SharePoint generates, its out of the box cross-browser compatibility (though not perfect) is pretty good. One area of weakness for non-IE browsers, however, is rich text editing. Recognizing this, Microsoft came to an agreement with tools vendor Telerik, whereby they would produce a version of their RadEditor that could be downloaded and used within SharePoint sites - without cost, and without sacrificing supportability. (They had a similar deal for Content Management Server, or CMS.)

That was the state of affairs in 2007, which is all well and good. But, time marches on, and it is almost 2009. If you are new to SharePoint, or if that early release was the last time you evaluated (or updated) the RadEditor Lite, you could be missing out on some nice improvements that go beyond cross-browser compatibility.

Note: Almost everything in this article applies to all "rich text" experiences within SharePoint, from Announcement lists, to MOSS Publishing Pages (the original purpose). I'm going to be using a SharePoint's Wiki here for two reasons:

  1. Wiki pages, by default, are basically one big rich text field, making screen shots easy to get and understand.
  2. One of the primary complaints about the SharePoint Wiki feature is that it is too hard for users to incorporate images into their pages. As you will see, the RadEditor Lite makes this problem go away.

The Basics

Consider the default SharePoint experience. For most users, just browsing the site, things are pretty consistent, regardless of whether you are using Internet Explorer (left) or Firefox (right):

image image
(Click on the image to see the full-sized screen shots, if desired.)

But click the "Edit" option, and you can see the problem -

In IE, you get a traditional editing toolbar, and everything looks pretty much like it does on the read-mode page:

image

But in Firefox, all you see is plain text, with embedded HTML markup:

image

Not exactly the experience you want for a typical, non-technical, user - the kind that Wikis were intended for.

Installing the RadEditor Lite Control

The first step, of course, is to download the control from Telerik's web site. It isn't exactly high-profile for them these days, so you'll either have to dig for it, or just follow the download links I've provided on this page.

That that will get you is a ZIP file containing an EULA document, the solution package (RadEditorMOSS.wsp), and a very extensive help file. Since I'm not going to go into all of the customization details possible with this control (and there are a lot of them), you might want to keep this in mind.

This control does not provide an automatic installer, so you will need to manually add the solution to your farm.

  1. Extract the WSP from the ZIP file
  2. Add the solution to SharePoint:
    stsadm -o addsolution -filename {path you extracted to}\RadEditorMOSS.wsp
  3. Deploy the solution to the web applications where you want to make this control available. You can do this either through the Operations tab of Central Administration, or by using the STSADM command with the deploysolution operator.
    Note: This solution is deployed on a per-web application basis, not farm-wide.
  4. Activate the feature on the web sites where you want to use the RadEditor Lite.

Notice the granularity allowed in the deployment. The feature activation itself takes place at the Site, rather than Site Collection level. You also have two options for activation:

  1. Use RadEditor to edit List Items
  2. Use RadEditor to edit List Items in Internet Explorer as well

image

Once you have activated the first feature, you will see that FIrefox now shows a much richer editing experience, complete with all of the expected toolbars:

image

If you using RadEditor Lite on MOSS, you're done! Maybe (see the next section). If you are using it on WSS, there are a couple more steps to perform on your server. This is because, by default, the RadEditor Lite relies on some controls that are part of MOSS. However, it does have its own built-in controls that perform similar functions, so you just need to adjust an XML configuration file. (You can use RadEditor's native controls on MOSS, too, by making the same adjustments.)

The XML configuration file is usually located at:

c:\Program Files\Common Files\microsoft shared\Web Server Extensions\wpresources\RadEditorSharePoint\4.5.4.0__1f131a624888eeed\RadControls\Editor

"4.5.4.0__1f131a624888eeed" above is the version of the control you are using, and so may vary.

You need to edit the file named "listtoolsfile.xml"

Find the line

<tool name="MOSSLinkManager" />

and edit it to remove "MOSS", resulting in a tag reading:

<tool name="LinkManager" />

I would also add one of the following lines:

<tool name="AjaxSpellCheck" />

or

<tool name="SpellCheck" />

The tool provides spell checking, so why not use it?

Progress is Progressing

There are a couple of questions you might be asking yourself at this point:

  • Why are there two separate activation options? and
  • Why would I need to use this control in Internet Explorer, when it already supports rich text editing?

The answer to the first question is this - when the free RadEditor Lite was first released for SharePoint, it was officially licensed for one purpose - to provide rich text editing to non-Internet Explorer browser users in MOSS Publishing sites. That is because the agreement with Telerik was carried over from a similar agreement relating to Content Management Server (CMS), and MOSS Publishing was the direct replacement for CMS functionality. It wasn't until much later that the agreement was expanded to allow use on WSS and for non-Publishing scenarios in MOSS. The original activation option allows for full compatibility with the pre-expansion scenario, while the second activation allows for the answer to the next question.

The second answer has a few different facets. The first is simple consistency. You may have noticed from the screen shot that the RadEditor uses the browser's default font, rather than the SharePoint styled font. By using the RadEditor in IE as well, you get the same experience for your users, even if it isn't "perfect".

The other piece is related to the spell-check activation I advised above. Even though it is limited compared to their paid version, the RadEditor Lite has a lot of features the default SharePoint rich text editor doesn't provide. By activating the component for Internet Explorer, you gain access to all of these features. Spell checking is just one of them. Another is that its tools for inserting tables and images are much richer. Look at the comparison below of the Image insertion dialog.

First is the default SharePoint's. You can type in a URL to an image, and enter an alt tag. That's it.

image

Now look at the RadEditor's image manager:

image

Not only do you get an easy browser, including image preview, notice the "Upload Image" tab. That's right, you can upload images to your site while editing a page! Besides cross-browser editing, Image management and spell checking have been some of the biggest complaints about SharePoint wikis, and the RadEditor Lite makes them all obsolete.

Summary

The Telerik RadEditor Lite is one of the oldest free add-in components available for SharePoint. It is also a very mature product, which has gone through a number of revisions over the years. It offers a lot of functionality to SharePoint users, developers, and administrators, no matter what the browser. Not only that, its use is fully endorsed by Microsoft. (See the SharePoint and ECM Blogs.)

Who could ask for anything more in a free download?

 
Posted by Woody Windischman | 5 Comments | Trackback Url | Bookmark with:        
Tags: Administration, Customization, Design, Governance, Lists and Libraries, SharePoint, Wiki, WSS

Comments

Wednesday, 19 Aug 2009 11:40 by Nancy
Does it allow pasting of images? For example, if I am creating a Wiki page from an existing Word doc that has images embedded in it, can I copy/paste those images into the new Wiki page? The hassle of saving images and then navigating to them later is what we want to avoid, since we have a lot of documents we want to change into Wiki pages. Thanks!

Wednesday, 19 Aug 2009 04:13 by Woody
Hi Nancy, Unfortunately, because the web has no way to reach into your PC to get the image, you can't just paste from into the editor - even with RADEditor Lite. It does remember the "placeholders" though, so once you do upload the images, you can just change the properties. As one possible workaround, Word can directly publish to a SharePoint blog post, including images, so that might help you avoid the manual image uploading problem.

Friday, 11 Sep 2009 01:31 by David Wall
I've had RadEditor Lite installed for a few months and users like it a lot. It is night and day over the built-in Sharepoint rich-text editor. As you mentioned, the image browser IS is huge benefit.

Thursday, 24 Sep 2009 09:35 by Ryan Steele
Hi Woody! Thanks for this helpful article. I wanted to mention a couple of stumbling blocks I encountered when I was implementing this solution. The first is that when you are activating the feature in the first site in step 4, you need to be logged in as a user with administrative rights on your IIS server. From the help file: "The first time you activate a RadEditor feature, you must be logged as an Administrator user. This is required, because the editor needs to update the default list editing template by copying a file - from \TEMPLATE\FEATURES\RadEditorFeature\RadEditorList.ascx to \TEMPLATE\CONTROLTEMPLATES\RadEditorList.ascx. "The file is copied by the IIS worker process, which in turn is impersonating the currently logged in user. That is why you need to be logged in as an Administrator to be able to copy the file. Once the file is copied, any user can activate/deactivate the RadEditor features. The RadEditorList.ascx file will stay until you uninstall the RadEditor for MOSS product. This means that is you upgrade to a newer version of the editor, you will need to re-activate (deactivate and then activate) the editor feature on any of the sites (only one is needed) in order for the RadEditorList.ascx file to be copied again. Again you should be logged in with an Administrator user when you activate the feature for the first time after an upgrade." (You've already logged in as a non-administrator and activated it? Just log in as an admin, deactivate and re-activate it.) The second issue that I encountered is that the editor may not display on your sites right away. This is due to caching on the server. The help file suggests running the "iisreset" command, which is a bit heavy-handed. I discovered that you can simply "touch" the web.config file in C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources -- i.e. open it in notepad and save it without changing it, so that the file timestamp changes -- and that will have the same effect.

Friday, 25 Sep 2009 04:16 by Woody
Hi Ryan, Thanks for that. I wasn't trying to be a substitute for the RadEditor manual, but I definitely see where that extra information could have been helpful. :) As for the "softer" reset, you can also just recycle the application pool for your web app. This way you don't change any timestamps, or take the chance of accidentally making a change to the web.config.

Name:
URL:
Email:
Comments: