ASPxClientCommandConsts.CHANGEVIDEO_COMMAND Property
In This Article
Identifies a command that changes the selected video element.
#Declaration
TypeScript
static CHANGEVIDEO_COMMAND: string
#Property Value
Type | Description |
---|---|
string | Value: “changevideo” |
#Remarks
The CHANGEVIDEO_COMMAND property can be used in the followng ways.
- In the ASPxClientHtmlEditor.CommandExecuted event — to determine the action performed by an end-user. If the ASPxClientHtmlEditorCommandEventArgs.commandName event parameter returns the CHANGEVIDEO_COMMAND property value, this means that an end-user has clicked the OK button within the Change Video dialog.
In the ASPxClientHtmlEditor.ExecuteCommand method — to execute the command manually.
In this case, the method requires an additional parameter, which is an object of the ASPxClientHtmlEditorChangeVideoCommandArguments type. To create a parameter, use the ASPxClientHtmlEditor.CreateChangeMediaElementCommandArguments method. You can also call the ASPxClientHtmlEditorChangeMediaElementCommandArguments.GetCommandName method of the created parameter to obtain the command name.
// Changing the selected video element's margins var video = htmlEditor.GetSelection().GetSelectedElement(); var args = htmlEditor.CreateChangeMediaElementCommandArguments(video); args.styleSettings.marginTop = "10px"; args.styleSettings.marginRight = "5px"; args.styleSettings.marginBottom = "15px"; args.styleSettings.marginLeft = "20px"; htmlEditor.ExecuteCommand(args.GetCommandName(), args);
Note
This command is available only in the Design View.
See Also