The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments Class

Contains settings related to the ASPxClientCommandConsts.INSERTYOUTUBEVIDEO_COMMAND command parameter.


declare class ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments extends ASPxClientHtmlEditorChangeMediaElementCommandArguments


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

To create an instance of this class, use the ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments constructor. Specify all required properties of the newly created object and pass the resulting parameter to the ASPxClientHtmlEditor.ExecuteCommand method.

// Inserting a new YouTube video element at the current cursor position
var args = new ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments(htmlEditor);
args.enablePrivacyEnhancedMode = true;
args.showPlayerControls = true;
args.showRelatedVideos = false;
args.showVideoInfo = true;
args.src = "";
htmlEditor.ExecuteCommand(args.GetCommandName(), args);
See Also