aspnet-js-insertpicturecommand-dot-execute-x28-imageurl-x29.md
Executes the InsertPictureCommand command with the specified parameters.
execute(
imageUrl: string,
callback?: (interval: Interval) => void
): boolean
| 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.
|
| Type | Description |
|---|---|
| boolean |
true if the command has been successfully executed; false if the command execution has failed.
|
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