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

Is there any way to override the standard behavior (javascript) of Ribbon controls? For example, I need the Color selector populate not all the colors available, but a restricted subset of them. In the CMDUI.xml file I see that Ribbon.EditingTools.CPEditTab.Font.FontColor element has an attribute PopulatequeryCommand="GetFontColorMenuXml". So, is it any way to override this out-of-the-box Command, so that it returns specified colors instead of standard set, or I need to develop my own color picker and replace the standard with it?

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

I don't think that this can be done without changing OOTB javascript and definition files. This is not recommended.

So, yes - you need to develop your own color picker, hide default one and show custom in same place.

I also found this article:

share|improve this answer
add comment

In short, you can customize it. Here is a nice example:

http://blogs.msdn.com/b/weslbo/archive/2011/04/21/how-to-create-a-custom-color-picker-flyout-in-the-sharepoint-ribbon.aspx

share|improve this answer
    
Ok, Thanks for your replies –  Skog Jan 23 '12 at 11:02
    
Skog, you're always welcome :) –  Falak Mahmood Jan 23 '12 at 12:53
add comment

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.