Skip to main content

ChangeFontFormattingCommand.getState Method

Gets information about the command’s state.

Declaration

getState(): CommandState<FontFormattingSettings>

Returns

Type Description
CommandState<FontFormattingSettings>

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.changeFontFormatting.getState();
See Also