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.
JScript |
var args = new ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments(htmlEditor);
args.enablePrivacyEnhancedMode = true;
args.showPlayerControls = true;
args.showRelatedVideos = false;
args.showVideoInfo = true;
args.src = "http://www.youtube.com/watch?v=jEddDJyWlBM";
htmlEditor.ExecuteCommand(args.GetCommandName(), args);
|