ASPxClientHtmlEditorChangeImageCommandArguments Class

Contains settings related to the ASPxClientCommandConsts.CHANGEIMAGE_COMMAND command parameter.

Declaration

declare class ASPxClientHtmlEditorChangeImageCommandArguments extends ASPxClientHtmlEditorInsertImageCommandArguments

Remarks

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

To create an instance of this class, pass the image you want to change to the ASPxClientHtmlEditorChangeImageCommandArguments constructor. It creates an object containing properties of the passed image. Then, you can change the required properties and pass the resulting parameter to the ASPxClientHtmlEditor.ExecuteCommand method.


// Changing the selected image border settings
var image = htmlEditor.GetSelection().GetSelectedElement();
var args = new ASPxClientHtmlEditorChangeImageCommandArguments(htmlEditor, image);
args.styleSettings.borderColor = "red";
args.styleSettings.borderStyle = "solid";
args.styleSettings.dorderWidth = "8px";
htmlEditor.ExecuteCommand(ASPxClientCommandConsts.CHANGEIMAGE_COMMAND, args);

Inheritance

See Also