Table of Contents
execCommand Method 

Executes a pre-defined command.

Syntax
JavaScript
 Editor.execCommand(command, args)

Parameters

command
The command name.
args
Additional argument for the command. The following arguments are supported:
Command Arguments
Paste Three additional arguments can be provided:
  1. The first argument specifies the paste filter to be used. Or null to use the default filter;
  2. The second argument specifies additional format information. This argument is ignored by the editor but is passed through to your ClientSideOnPaste handler;
  3. The third argument specifies the Paste dialog title, this title is only used on non-IE browsers since IE does not use the paste dialog.
for example, the following JavaScript code uses paste filter TextWithLineBreak to format the text first, then call ClientSideOnPaste with argument "style1" for additional formating you may wish to perform:
JavaScript
Editor1.execCommand("Paste", "TextWithLineBreak", "style1", "Paste Text");
InsertHTML One additional argument is used to pass the HTML text you wish to insert. For example,
JavaScript
Editor1.execCommand("InsertHTML", "Some text to insert!");
See Also