hi, me again, after test plugin example,i created my own plugin, insert oleobject to excel. it is working.
but,when i clicked save button.then refresh the excel, the oleobject not saved.
i test AddImage and AddShape. all can saved
(function (window, undefined) {
window.Asc.plugin.init = function (text) {
var plugin_uuid = window.Asc.plugin.info.guid;
var comment = document.getElementById("textareaIDComment");
document.getElementById('buttonIDAddComment').onclick = function () {
Asc.scope.mp4Link = comment.value;
Asc.scope.plugin_uuid = plugin_uuid;
window.Asc.plugin.callCommand(function () {
var oWorksheet = Api.GetActiveSheet();
// oWorksheet.AddImage("https://api.onlyoffice.com/content/img/docbuilder/examples/coordinate_aspects.png", 60 * 36000, 35 * 36000, 0, 2 * 36000, 0, 3 * 36000);
oWorksheet.AddOleObject("https://api.onlyoffice.com/content/img/docbuilder/examples/ole-object-image.png", 130 * 36000, 90 * 36000, "https://youtu.be/SKGz4pmnpgY", Asc.scope.plugin_uuid, 0, 2 * 36000, 4, 3 * 36000);
// var oFill = Api.CreateSolidFill(Api.CreateRGBColor(255, 111, 61));
// var oStroke = Api.CreateStroke(0, Api.CreateNoFill());
// var oDrawing = oWorksheet.AddShape("flowChartOnlineStorage", 60 * 36000, 35 * 36000, oFill, oStroke, 0, 2 * 36000, 0, 3 * 36000);
}, true)
}
};
window.Asc.plugin.button = function (id) {
this.executeCommand("close", "");
}
})(window, undefined)
please any one!!!