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

I have custom heading styles (h1,h2,h3) displaying in the SharePoint Ribbon to choose from on the front-end. SharePoint picks up on this from my css file. Is it possible to get this in the back-end as well?

Example: In a content List, an item with a "Page Content" field. I would a user to see my custom Heading style options in the SharePoint Ribbon.

share|improve this question
1  
can you add a bit more detail so we can understand exactly how to reproduce what you are trying to do? –  Tiago Duarte Aug 1 at 19:16

2 Answers 2

I had a question similar to this come up a while ago regarding creating a new style for the ribbon. I would guess you should be able to replace existing with your own this way. If I understand the question that's what you're trying to do. Hopefully this helps you out.

  1. Open Designer with the appropriate site collection that you want the style to appear.
  2. Go to All Files -> Style Library.
  3. Create a new .css file and name it approriately.
  4. Edit the file and depending on whether you want it to show up in Page Elements or Text Styles you will list it as one of the two:
    • Page Elements - span.ms-rteElement-/yourdefinedname/
    • Instead of using a span you can use any 'h' tag if you'd prefer
    • Text Styles - .ms-rteEStyle-/yourdefinedname/
  5. Inside your class definition to have a visual name appear in the ribbon use:
    • -ms-name:"Style Name";
  6. After that, style the class however else you need.
  7. Save the file and make sure to publish a major version.
  8. Now you need to reference the .css file. You can do this either in the master page or in the page layout that it will be used.
share|improve this answer
    
Hi Jordan, Yes I have this setup already for the front-end. I am looking for this in the back-end (Site contents). The masterpage is not loaded in the back-end, so we can't reference the css file from there. Settings icon > Site contents > "my List (app)" > edit item. –  tomsmithweb Aug 4 at 14:44
up vote 0 down vote accepted

The "System Master Page" is what I was looking for.

Site Settings > Masterpage > "System Master Page".

I referenced my CSS file in the System Master Page and it worked.

SPM:

<SharePoint:CssRegistration Name="/Style Library/myRibbon.css" runat="server"/>
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.