Executes a command associated with a dialog.
[JavaScript]
Editor.execDialogCommand(
command, srcElement)
Parameters
-
command
- The command name. See remark section details.
-
srcElement
- The DHTML elements that triggers the call. In the context of an event handler, keyword this should be used.
Remarks
Certain commands requires user input. When user triggers such a command (for example, by clicking the corresponding button on the toolbar), a dialog is presented to collect user input. The user can then enter the necessary information and click a button in the dialog to actually carry out the command.
Most dialogs are used for one command only. For example, the InsertOrEditImage dialog is only used for the InsertOrEditImage command. For these dialogs, the same command that was used to invoke the dialog is used to call this function. For example, The default HTML for the OK button of the InsertOrEditImage dialog is:
[HTML] <input type="button"
name="eo_editor_default_button"
value="OK"
style="width:80px;"
onclick="eo_GetContainer(this, 'Editor').execDialogCommand('InsertOrEditImage', this);" />
Find dialog supports multiple commands: FindNext, FindReplace and FindReplaceAll. Thus for Find dialog, one of these three commands should be used.
This function returns the modified/created DOM object for these commands: InsertOrEditImage, InsertOrEditLink, InsertOrEditAnchor, InsertOrEditTable. For example, it returns the newly created HTML link (a object) if the function is called with command InsertOrEditLink to insert a HTML link.
See here for more information about cusotmizing dialogs.
See Also
Editor Object