Skip to main content
A newer version of this page is available. .

ChangeFontBackColorCommand.getState Method

Gets information about the command state.

Declaration

getState(): CommandState<string>

Returns

Type Description
CommandState<string>

A CommandState<T><String,> object representing the command 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