Skip to main content

SetParagraphLevelCommand.execute(level) Method

Executes the SetParagraphLevelCommand command with the specified parameter.

Declaration

execute(
    level: number
): boolean

Parameters

Name Type Description
level number

The applied style. The value should be in the range from 0 to 9.

Returns

Type Description
boolean

true if the command has been successfully executed; false if the command execution has failed.

Remarks

The RichEditCommands.setParagraphLevel method allows you to control whether the selected paragraphs are displayed in a table of contents depending on the level parameter’s value:

  • 0 - the selected paragraphs are not shown in the table of contents;
  • 1 - 9 - the selected paragraphs are shown in the table of contents on the corresponding level.

Usage example:

richEdit.commands.setParagraphLevel.execute(2);
See Also