Javascript Reference
Categories: TextRange

javascript TextRange execCommand( )

@July 30, 2008, 1:07 p.m.
execCommand( ) Firefox/Netscape/NN n/a IE 4(Win) Chrome/Safari/DOM n/a  
execCommand("commandName"[, UIFlag[, value]])

Executes the named command on the current TextRange object. Many commands work best when the TextRange object is an insertion point. See Appendix D for a list of commands.

  • A case-insensitive string value of the command name. See Appendix D.
  • Optional Boolean value: true to display any user interface triggered by the command (if any); false to prevent such display.
  • A parameter value for the command.
Returned Value

Boolean value: true if command is successful; false if unsuccessful.

Powered by Linode.