Skip to main content
A newer version of this page is available. .

InsertPictureCommand.execute(imageUrl) Method

Executes the InsertPictureCommand command with the specified parameters.

Declaration

execute(
    imageUrl: string,
    callback?: (interval: Interval) => void
): boolean

Parameters

Name Type Description
imageUrl string

A picture’s URL.

callback (interval: Interval) => void

A function to be executed after a picture is inserted. The interval parameter returns an Interval object that stores the inserted picture’s length and position.

Returns

Type Description
boolean

true if the command has been successfully executed; false if the command execution has failed.

Remarks

var imageUrl = "https://demos.devexpress.com/ASPxImageAndDataNavigationDemos/Content/Images/landscapes/07.jpg";
richEdit.commands.insertPicture.execute(imageUrl, function (interval) {
   richEdit.selection.intervals = [interval];
   richEdit.commands.changeFloatingObjectTextWrapping.execute({ floatingObjectTextWrapType: ASPx.FloatingObjectTextWrapType.None });
});
See Also