ASPxClientCommandConsts.CHANGEAUDIO_COMMAND Property
In This Article
Identifies a command that changes the selected audio element.
#Declaration
TypeScript
static CHANGEAUDIO_COMMAND: string
#Property Value
Type | Description |
---|---|
string | Value: “changeaudio” |
#Remarks
The CHANGEAUDIO_COMMAND property can be used in the followng ways.
- In the ASPxClientHtmlEditor.CommandExecuted event — to determine the action performed by an end-user. If the ASPxClientHtmlEditorCommandEventArgs.commandName event parameter returns the CHANGEAUDIO_COMMAND property value, this means that an end-user has clicked the “OK” button within the “Change Audio“ dialog.
In the ASPxClientHtmlEditor.ExecuteCommand method — to execute the command manually.
In this case, the method requires an additional parameter, which is an object of the ASPxClientHtmlEditorChangeAudioCommandArguments type. To create a parameter, use the ASPxClientHtmlEditor.CreateChangeMediaElementCommandArguments method. You can also call the ASPxClientHtmlEditorChangeMediaElementCommandArguments.GetCommandName method of the created parameter to obtain the command name.
// 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);
Note
This command is available only in the Design View.
See Also