You can easily modify existing styles or add new styles to the MOSS Rich Text Editor by using the Alternate CSS URL option (along with adding any other CSS overrides from the CORE.CSS file).

The out-of-the-box styles for the editor are located on the Web front-end server at %systemdrive%:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\STYLES\HtmlEditorCustomStyles.css. There are three main styles which are accessed from the rich text editor style drop-down: .ms-rteCustom-Article; .ms-rteCustom-ArticleByline; .ms-rteCustom-ArticleHeadLine. Note that the styles all include the named parameter ‘rteCustom’.

To add a new style and have that style available from the style drop-down selection in the rich text editor, create a new css file and then create a new class, for example:

.ms-rteCustom-SharePointRusSpecialStyle

{

Font-family: verdana;

Font-style: italic;

Font-size: 18pt;

Color: fuchsia;

}

Then save the file and upload it to the root site’s Style Library, i.e. http://site_server/Style%20Library/Forms/AllItems.aspx.

Next, using the browser, navigate to the Site Master Page Settings page (from Site Settings, Look and Feel, Master Page) and in the Alternate CSS URL section select the radio button ‘Specify a CSS file to be used by this publishing site and all sites that inherit from it’. Then Browse to the Style Library where you uploaded the custom CSS file and select that file. Click OK.

Note, here we’ve simply added an override for a custom CSS class specifically for the rich text editor. But, you could just as easily bundle this additional class into your main CSS override file, remembering to specify the ‘rteCustom’ attribute in the class name.

Then go use the rich text editor to access the new style.

LEAVE A REPLY

Please enter your comment!
Please enter your name here