Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How do you hide out-of-the-box entries from the Markup Styles definitions in the rich text editor in the ribbon in SharePoint 2010?

I know how to add new entries using CSS, but not how to hide the ones that are already there.

(Certainly modifying the corev4.css in the SharePoint root is not the way to do this.)

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Each RichHtmlField can be customized to use a different set of markup styles, using the PrefixStyleSheet property. This way, the Rich HTML Field can be made to not use the built-in markup styles from the SharePoint OOTB style sheet, but any set of styles from any other style sheet.

<PublishingWebControls:RichHtmlField
    id="Content"
    FieldName="PublishingPageContent" 
    PrefixStyleSheet="my-rte" 
    runat="server"
    />
share|improve this answer

I am currently trying to figure this out myself.

An option i am exploring is not using:

<SharePoint:CssLink ID="CssLink1" runat="server" Version="4"/>

and instead create a copy of the coreV4.css file and include it seperately. My custom CSS file takes care of everything except the ribbon, therefore i could leave all the ribbon specific CSS in the copied file but remove any references to markup styles i do not want.

As i say, this may be an option but is untested

share|improve this answer

I've inherited the cssLink object used in the masterpage (that's the one responsible for injecting all the oob css references) and changed the reference to the controls.css, core4v.css (or any) to my project-specific locations with similar files.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.