RichTextEditor Demo
Home Pricing

## editor.execCommand()

Editor object exposes an execCommand method to run commands that manipulate the current editable region.

#### Syntax

`editor.execCommand(command,optionalValue)`

###### command

`Specifies the name of the command to execute on the selected section.`

###### value

`Some commands need a value to be completed.`

## Example 1:

1. var editor1 = new RichTextEditor("#div_editor1");
3. editor1.execCommand("fullscreenenter");

## Example 2:

1. var editor2 = new RichTextEditor("#div_editor1");
3. editor2.execCommand("forecolor","red");