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?
Add a comment
|
2 Answers
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:
In short, you can customize it. Here is a nice example: