Back to Devexpress

ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments Class

aspnet-js-aspxclienthtmleditorinsertyoutubevideocommandarguments.md

latest2.3 KB
Original Source

ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments Class

Contains settings related to the ASPxClientCommandConsts.INSERTYOUTUBEVIDEO_COMMAND command parameter.

Declaration

ts
declare class ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments extends ASPxClientHtmlEditorChangeMediaElementCommandArguments

Remarks

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.

javascript
// 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 = "https://www.youtube.com/watch?v=jEddDJyWlBM";
htmlEditor.ExecuteCommand(args.GetCommandName(), args);

Inheritance

ASPxClientHtmlEditorCommandArguments ASPxClientHtmlEditorChangeMediaElementCommandArguments ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments ASPxClientHtmlEditorChangeYouTubeVideoCommandArguments

See Also

Client-Side Commands

ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments Members