TinyMCE:API/tinymce.Editor/execCommand
From Moxiecode Documentation Wiki
Contents |
[edit]
Method: execCommand
[edit]
Summary
Executes a command on the current instance. These commands can be TinyMCE internal commands prefixed with "mce" or they can be build in browser commands such as "Bold". A compleate list of browser commands is available on MSDN or Mozilla.org. This function will dispatch the execCommand function on each plugin, theme or the execcommand_callback option if none of these return true it will handle the command as a internal browser command. There is a reference of all the commands available in the editor and the browser.
[edit]
Syntax
<bool> execCommand(<String> cmd, <bool> ui, <mixed> val)
[edit]
Parameters
- cmd
- Command name to execute, for example mceLink or Bold.
- ui
- True/false state if a UI (dialog) should be presented or not.
- val
- Optional command value, this can be anything.
[edit]
Returns
True/false if the command was executed or not.
