MOSS Rich Text Editor Styles – modify and add new styles

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:



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.

Duplicated WebPart added to a Page on WCM

For some reason, when using features to add pages to a WCM site the webparts that exist on the page appear duplicated.

But using API and getting the object weparts using the GetLimitedWebPartManager there is only the correct webpart.

Then when i was trying to find the reason for this problem, the SharePoint Designer gave me the solution.

He automatically added to the <%@ Page this information meta:webpartpageexpansion="full".

So i've changed the page on my feature, deleted the page from my site, deactivate the feature, activate the feature and voiala my page is working.

By the way i've used a feature to add pages to my site because the page will exist on every sites and subsites of my site.

CHANGED: Don't use this option, please see the comment to this post