aspnetcore-js-devexpress-dot-richedit-9b9ee533.md
A ribbon color box item.
export class RibbonColorBoxItem extends RibbonItemBase
var ribbonColorBox = new DevExpress.RichEdit.RibbonColorBoxItem;
ribbonColorBox.id = "myColorBox";
ribbonColorBox.beginGroup = true;
ribbonColorBox.text = "My Color";
ribbonColorBox.value = "red";
var options = DevExpress.RichEdit.createOptions();
options.ribbon.getTab(DevExpress.RichEdit.RibbonTabType.Home).insertItem(ribbonColorBox,3);
options.events.customCommandExecuted.addHandler(function(s, e) {
switch (e.commandName) {
case 'myColorBox':
console.log(e.parameter);
}
});
RibbonItemBase RibbonColorBoxItem
See Also
Initializes a new instance of the RibbonColorBoxItem class with specified settings.
constructor(
id: RibbonItemId,
text: string,
value: string,
options?: RibbonColorBoxItemOptions
)
| Name | Type | Description |
|---|---|---|
| id | RibbonItemId |
The item identifier.
| | text | string |
The item text.
| | value | string |
The current editor color.
| | options | RibbonColorBoxItemOptions |
The item options.
|
Specifies an identifier that allows you to localize the item’s text.
localizationId?: string
| Type | Description |
|---|---|
| string |
The item’s localization identifier.
|
If the text property is specified, the item is not localized.
See Also
Angular Application - Custom Localization Strings
Specifies the text displayed by the item input element.
text: string
| Type | Description |
|---|---|
| string |
The item text.
|
Specifies options of the text displayed next to the item.
textOptions: RibbonItemTextOptions
| Type | Description |
|---|---|
| RibbonItemTextOptions |
An object that contains text options.
|
Returns the item’s type.
readonly type = RibbonItemType.ColorBox
| Type | Description |
|---|---|
| ColorBox |
Identifies the ColorBox item type.
|
Specifies the currently selected color in text format.
value: string
| Type | Description |
|---|---|
| string |
The current editor color.
|
The value property supports the following color formats.
HTML color name
Longhand hexadecimal notation
Shorthand hexadecimal notation
RGB format