Skip to main content
A newer version of this page is available. .

ASPxClientHtmlEditorChangeVideoCommandArguments Class

Contains settings related to the ASPxClientCommandConsts.CHANGEVIDEO_COMMAND command parameter.

Declaration

declare class ASPxClientHtmlEditorChangeVideoCommandArguments extends ASPxClientHtmlEditorInsertVideoCommandArguments

Remarks

When the ASPxClientHtmlEditor.ExecuteCommand method is used to execute the ASPxClientCommandConsts.CHANGEVIDEO_COMMAND command manually, it requires an additional parameter of the ASPxClientHtmlEditorChangeVideoCommandArguments type.

To create an instance of this class, pass the video element you want to change to the ASPxClientHtmlEditor.CreateChangeMediaElementCommandArguments method. It creates an object containing properties of the passed video element. Then, you can change the required properties and pass the resulting parameter to the ASPxClientHtmlEditor.ExecuteCommand method.

// 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);
See Also