Javascript: ImageCollection.remove Method
Description
Removes an image from a Text Control document.
Syntax
<void> ImageCollection.remove(<Image> image, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| image | Specifies the image to remove. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates ImageCollection.remove in a practical document-editing workflow. It removes an image from a Text Control document.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function remove(image) {
TXTextControl.images.remove(
image,
function() {
console.log("remove completed.");
},
onTxError
);
}