SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

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

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

Your Answer


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.