InsertPictureCommand.execute(imageUrl) Method
In This Article
Executes the InsertPictureCommand command with the specified parameters.
#Declaration
TypeScript
execute(
imageUrl: string,
callback?: (interval: Interval) => void
): boolean
#Parameters
Name | Type | Description |
---|---|---|
image |
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 |
|
#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