7

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?

3

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:

4

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

  • Skog, you're always welcome :) – Falak Mahmood Jan 23 '12 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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