Back to Devexpress

CommandState Class

aspnetcore-js-devexpress-dot-richedit-dc9cee24.md

latest1.5 KB
Original Source

CommandState Class

Contains a command’s state.

Declaration

ts
export class CommandState

Properties

enabled Property

Returns whether the command is enabled in the RichEdit control.

Declaration

ts
readonly enabled: boolean

Property Value

TypeDescription
boolean

true if the command is enabled; otherwise, false.

|

Remarks

javascript
var fontColorEnabled = richEdit.getCommandState(DevExpress.RichEdit.HomeTabCommandId.ChangeFontForeColor).enabled;

value Property

Returns the command’s value.

Declaration

ts
readonly value?: any

Property Value

TypeDescription
any

The command’s value. undefined if the command does not have a value or has multiple values in the selection.

|

Remarks

javascript
var currentFontColor = richEdit.getCommandState(DevExpress.RichEdit.HomeTabCommandId.ChangeFontForeColor).value;

visible Property

Returns whether the command is visible.

Declaration

ts
readonly visible: boolean

Property Value

TypeDescription
boolean

true if the command is visible; otherwise, false.

|

Remarks

javascript
var copyCommandVisible = richEdit.getCommandState(DevExpress.RichEdit.ContextMenuCommandId.Copy).visible;