14.4. Customizing the HTML Editor Field Control

The rich HTML Editor field control may be the most commonly used control on page layouts within Publishing sites. The control provides content authors with the capability to author rich content using formatting, tables, hyperlinks, and images, as well as modify the font color and size — all with a slick live preview of the rendered content. This control, shown in Figure 14-4, is very similar to the familiar formatting toolbars available in common word processing applications such as Office Word 2007.

Figure 14-4. Figure 14-4

While the flexibility provided by the HTML Editor field control can be very useful in many cases, at other times it is necessary to restrict what content authors can and cannot do. For instance, it may not be desirable to allow content authors to pick the color or font size of the text, but should instead be defined using specific CSS classes. At other times, content authors might want to disallow the use of images or tables within a content field. To satisfy these needs, the HTML Editor field control provides a way to enable and disable buttons, as well as create custom buttons and specify the CSS classes available for use within a site.

14.4.1. Enabling and Disabling Buttons

Enabling and disabling buttons on the HTML Editor field control is very easy. There are two ways to control the buttons. One way is ...

Get Professional SharePoint® 2007 Web Content Management Development: Building Publishing Sites with Office SharePoint Server 2007 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.