Back to Devexpress

RibbonItemBase Class

aspnetcore-js-devexpress-dot-richedit-24b8cc02.md

latest2.7 KB
Original Source

RibbonItemBase Class

The base class for ribbon items.

Declaration

ts
export abstract class 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);
    }
});

Inheritance

RibbonItemBase RibbonButtonItem

RibbonSubMenuItem

RibbonMenuItem

RibbonSelectBoxItem

RibbonNumberBoxItem

RibbonColorBoxItem

See Also

Ribbon Customization

Properties

beginGroup Property

Specifies whether an item separator should be displayed before the current item.

Declaration

ts
beginGroup: boolean

Property Value

TypeDescription
boolean

true to display a separator before the item; otherwise, false.

|

id Property

Returns the ribbon item identifier.

Declaration

ts
id: RibbonItemId

Property Value

TypeDescription
RibbonItemId

The item identifier.

|

Remarks

When a user selects a custom ribbon item, the RichEdit raises the CustomCommandExecutedEvent. The event argument’s commandName property returns the currently processed item’s id property value.

Note

Rich Text Editor determines commands and ribbon items by numeric identifiers. Use strings or numbers greater than 10000 for custom command identifiers.

type Property

Returns the ribbon item type.

Declaration

ts
abstract readonly type: RibbonItemType

Property Value

TypeDescription
RibbonItemType

The item type.

|