Thursday, May 7, 2009

Create Custom Styles for the RichTextEditor in SharePoint

If we want to add the custom styles to Rich Text Editor present in (Content Editor web part) we need to follow the below steps:
  • Open the Custom Style Sheet which you are Created for the Site(by default core.css will apply for SharePoint Sites).
  • Add the Custom Style which Starts with ".ms-rteCustom-"
    For e.g: .ms-rteCustom-SquareBulletList{Font-family: arial; Line-style-type: square}.
    Now the above custom style will appear on Styles tab located in the Rich Text Editor toolbar as name “SquareBulletList” as shown below.

Note:The Custom Styles which we created will appear only when the text is selected in Rich Text Editor as shown above.
Images: "IMG.ms-rteCustom-yourstylename"
Links: "A:link.ms-rteCustom-yourstylename"
Numbered Lists: "OL.ms-rteCustom-yourstylename"
Un-Numbered Lists: "UL.ms-rteCustom-yourstylename"
Basic text: ".ms-rteCustom-yourstylename"
These are some of the Cusotm Style formats for RichTextEditor used in the Content Editor WebPart.

1 comment:

digital signature Adobe Acrobat said...

This article is a great source of information...By the way, Looks like the predictions in the 1981 book by Joel Garreau "Nine Nations of North America" came true. You should read it (If you haven't) it's a great book.