Posts Tagged ‘ Rich Text Editor ’

Custom Rich Text Editor Styles in SharePoint 2010

A common request to have in SharePoint 2010, especially externally facing installations, is to have custom Styles available in the menu.

Thankfully, SharePoint 2010 makes this extremely easy. The key is the prefix attached to your styles. SharePoint will interpret any style beginning with ms-rteElement-[custom name] as a markup style and it will interpret anything starting with ms-rteStyle-[custom name] as a Style. However, you are able to change this prefix, but we’ll start out by creating some new styles using the default ‘ms-rte’

First, the differences between the two:

Markup Styles (ms-rteElement):

  • Will wrap the currently selected area in the specified tag (See below)
  • Applied style to newly created tag

Styles (ms-rteStyle):

  • Applies your custom class to the currently selected element
  • Will not add additional markup

Getting Started

Now that we’ve discussed the differences between them, lets talk about how to implement them. To start, make sure you have a stylesheet already linked on your SharePoint master page. Once that’s ready, follow the steps below.

Continue reading

Advertisements