Skip to main content

ChangeFontBackColorCommand.getState Method

Gets information about the command’s state.

Declaration

getState(): CommandState<string>

Returns

Type Description
CommandState<string>

An object that contains the command’s state.

Remarks

The command state contains the value of the style property applied to characters in the selected range. If these characters have different values of the corresponding style property, the command state’s value field returns undefined.

If the selection is collapsed (its range length equals 0) the command state’s value field contains the value of the nearest word’s style property.

Usage example:

richEdit.commands.changeFontBackColor.getState();
See Also