Back to Devexpress

RibbonColorBoxItem Class

aspnetcore-js-devexpress-dot-richedit-9b9ee533.md

latest3.6 KB
Original Source

RibbonColorBoxItem Class

A ribbon color box item.

Declaration

ts
export class RibbonColorBoxItem extends RibbonItemBase

Remarks

javascript
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);
    }
});

Inherited Members

beginGroup

id

Inheritance

RibbonItemBase RibbonColorBoxItem

See Also

Ribbon Customization

constructor(id, text, value)

Initializes a new instance of the RibbonColorBoxItem class with specified settings.

Declaration

ts
constructor(
    id: RibbonItemId,
    text: string,
    value: string,
    options?: RibbonColorBoxItemOptions
)

Parameters

NameTypeDescription
idRibbonItemId

The item identifier.

| | text | string |

The item text.

| | value | string |

The current editor color.

| | options | RibbonColorBoxItemOptions |

The item options.

|

Properties

localizationId Property

Specifies an identifier that allows you to localize the item’s text.

Declaration

ts
localizationId?: string

Property Value

TypeDescription
string

The item’s localization identifier.

|

Remarks

If the text property is specified, the item is not localized.

See Also

Angular Application - Custom Localization Strings

text Property

Specifies the text displayed by the item input element.

Declaration

ts
text: string

Property Value

TypeDescription
string

The item text.

|

textOptions Property

Specifies options of the text displayed next to the item.

Declaration

ts
textOptions: RibbonItemTextOptions

Property Value

TypeDescription
RibbonItemTextOptions

An object that contains text options.

|

type Property

Returns the item’s type.

Declaration

ts
readonly type = RibbonItemType.ColorBox

Property Value

TypeDescription
ColorBox

Identifies the ColorBox item type.

|

value Property

Specifies the currently selected color in text format.

Declaration

ts
value: string

Property Value

TypeDescription
string

The current editor color.

|

Remarks

The value property supports the following color formats.

  • HTML color name

  • Longhand hexadecimal notation

  • Shorthand hexadecimal notation

  • RGB format