ASPxClientCommandConsts.FONTSIZE_COMMAND Property
In This Article
Identifies a command that changes the size of the selected text.
#Declaration
TypeScript
static FONTSIZE_COMMAND: string
#Property Value
Type | Description |
---|---|
string | Value: “fontsize” |
#Remarks
The FONTSIZE_COMMAND property can be used in the following ways.
- In the ASPxClientHtmlEditor.CommandExecuted event — to determine the toolbar or ribbon item clicked by an end-user. If the ASPxClientHtmlEditorCommandEventArgs.commandName event parameter returns the FONTSIZE_COMMAND property value, this means that either the ToolbarFontSizeEdit toolbar item or the HEFontSizeRibbonCommand ribbon item (depending upon the toolbar mode used) has been manipulated by an end-user.
In the ASPxClientHtmlEditor.ExecuteCommand method — to execute the command manually.
In this case, the method requires an additional parameter, which is the new size of the font. It can be passed in two ways.
An integer value from 1 to 7. Each value corresponds to one of the seven default values:
- A string represents the required value in pixels.
//changes the size of the font to 12pt htmlEditor.ExecuteCommand(ASPxClientCommandConsts.FONTSIZE_COMMAND, 3); //changes the size of the font to 16px htmlEditor.ExecuteCommand(ASPxClientCommandConsts.FONTSIZE_COMMAND, '16px');
Note
This command is available only in the Design View.
See Also