Replaces the first selected drawing with the image specified in the parameters. If there are no drawings selected, the method inserts the image at the current position.
Name | Type | Description |
oImageData | ImageData | The information about the base64 encoded png image. |
window.saveImage = function () { let sImageSrc = imageEditor.toDataURL (); let editorDimension = imageEditor.getCanvasSize (); let nWidth = editorDimension.width; let nHeight = editorDimension.height; let oImageData = { "src": sImageSrc, "width": nWidth, "height": nHeight }; window.Asc.plugin.executeMethod ("PutImageDataToSelection", [oImageData]); window.Asc.plugin.executeCommand ("close", ""); };