cut

RichEditCommands.setParagraphLevel Property

Gets a command to apply a paragraph level to the selected text

Declaration

readonly setParagraphLevel: SetParagraphLevelCommand

Property Value

Type Description
SetParagraphLevelCommand

An object that provides methods that execute the command and check its state.

Remarks

Call the execute(level) method to invoke the command. The method checks the command state (obtained via the getState method) to determine whether the action can be performed.

The 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);

You can use the getState method to obtain the selected paragraphs' current paragraph level.

See Also