window.Asc.plugin.executeMethod ("EditOleObject", [args], callback)
Defines the method that allows changing the OLE object with the InternalId specified in OLE object data.
This method should be used in the following way:
window.Asc.plugin.executeMethod ("EditOleObject", [NewObject]);
Parameter |
Description |
Type |
Example |
NewObject |
The OLEObjectData object which contains the following parameters:
-
Data - OLE object data (internal format),
type: string,
example: "{data}";
-
ImageData - an image in the base64 format stored in the OLE object and used by the plugin,
type: string,
example: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6";
-
ApplicationId - an identifier of the plugin which can edit the current OLE object and must be of the asc.{UUID} type,
type: string,
example: "asc.{38E022EA-AD92-45FC-B22B-49DF39746DB4}";
-
InternalId - the OLE object identifier which is used to work with OLE object added to the document,
type: string,
example: "5_556";
-
ParaDrawingId - an identifier of the drawing object containing the current OLE object,
type: string,
example: "1_713";
-
Width - the OLE object width measured in millimeters,
type: number,
example: 70;
-
Height - the OLE object height measured in millimeters,
type: number,
example: 70;
-
WidthPix - the OLE object image width in pixels,
type: number,
example: 60 * 36000;
-
HeightPix - the OLE object image height in pixels,
type: number,
example: 60 * 36000.
|
object |
|
The method returns the undefined value.
window.Asc.plugin.executeMethod("EditOleObject", [{"Data": "{data}", "ImageData": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6", "ApplicationId": "asc.{38E022EA-AD92-45FC-B22B-49DF39746DB4}", "InternalId": "5_556", "ParaDrawingId": "1_713", "Width": 70, "Height": 70, "WidthPix": 60 * 36000, "HeightPix": 60 * 36000}]);