Home | Web Design and iOS Development

SharePoint Custom Editor Styles Problem

How's this for a mysterious SharePoint problem:

You probably know that if you want to add custom styles to the standard WYSIWYG content editor within SharePoint, you need to add those styles to a css file called HTMLEditorCustomStyles.css that lives within the hive (12) directory on the server. Each style needs to have a special prefix such as myCustomStyleCustom-Heading_Style_Blue_Box in order to work (you need the bold Custom as well). If you use a prefix that's different from the Microsoft standard prefix (.ms-rteElement-), that also needs to be added to your placeholders as an attribute (PrefixStyleSheet="myCustomStyle" )

We experienced a weird problem in which the drop down appeared to determinedly cache three of the styles and no changes to the css file or the page layout would make it pick up the other styles listed. I checked the server BLOB cache, local caching etc., with no joy. The solution (or cludge) was a simple one that I found in this article, just add the custom styles to the core.css in the hive. I've no idea why it was behaving the way that it was as HTMLEditorCustomStyles as the Microsoft quoted location for these styles but hey, that's the joy of IT.