ASPxClientHtmlEditorChangeAudioCommandArguments Class
Contains settings related to the ASPxClientCommandConsts.CHANGEAUDIO_COMMAND command parameter.
Declaration
declare class ASPxClientHtmlEditorChangeAudioCommandArguments extends ASPxClientHtmlEditorInsertAudioCommandArguments
Remarks
When the ASPxClientHtmlEditor.ExecuteCommand method is used to execute the ASPxClientCommandConsts.CHANGEAUDIO_COMMAND command manually, it requires an additional parameter of the ASPxClientHtmlEditorChangeAudioCommandArguments type.
To create an instance of this class, pass the audio element you want to change to the ASPxClientHtmlEditor.CreateChangeMediaElementCommandArguments method. It creates an object containing properties of the passed audio element. Then, you can change the required properties and pass the resulting parameter to the ASPxClientHtmlEditor.ExecuteCommand method.
// Changing the selected audio element's id and css class
var audio = htmlEditor.GetSelection().GetSelectedElement();
var args = htmlEditor.CreateChangeMediaElementCommandArguments(audio);
args.id = "myAudioNew";
args.styleSettings.className = "myCssClass";
htmlEditor.ExecuteCommand(args.GetCommandName(), args);
Inheritance
See Also