RibbonItemBase Class
The base class for ribbon items.
Declaration
export abstract class RibbonItemBase
Remarks
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
See Also
Properties
beginGroup Property
Specifies whether an item separator should be displayed before the current item.
Declaration
beginGroup: boolean
Property Value
Type | Description |
---|---|
boolean | true to display a separator before the item; otherwise, false. |
id Property
Returns the ribbon item identifier.
Declaration
id: RibbonItemId
Property Value
Type | Description |
---|---|
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
abstract readonly type: RibbonItemType
Property Value
Type | Description |
---|---|
RibbonItemType | The item type. |