 
 "variations" : [
        {
            "description" : "Учебный плагин",
            "url"         : "index.html",
            "icons": [ "logo(64х64).png" ],           
            "isViewer"        : true,
            "EditorsSupport"  : ["cell"],
            "isVisual"        : true,
            "isModal"         : false,
            "isInsideMode"    : true,
            "initDataType"    : "",
            "initData"        : "",
            "isUpdateOleOnResize" : false,
            "buttons"         : []            
        },
        {
            "description" : "About",
            "descriptionLocale": {                
                "ru": "О плагине"
            },
            "url"         : "about.html",
            "icons": [ "logo(64х64).png"],
            
            "isViewer"        : true,
            "EditorsSupport"  : ["cell"],
            "isVisual"     : true,
            "isModal"      : true,
            "isInsideMode" : false,
            "initDataType" : "none",
            "initData"     : "",
            "isUpdateOleOnResize" : false,
            "buttons" : [ { "text": "Ok", "primary": true } ],
            "size" : [400, 250]
        }
    ]<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>About</title>
    <style>
        p, a{
            font-size: 12px;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        }
    </style>
    <script type="text/javascript" src="../v1/plugins.js"></script>
    <script type="text/javascript" src="../v1/plugins-ui.js"></script>
    <link rel="stylesheet" href="../v1/plugins.css">    
</head>
<body style="padding-left: 20px; padding-right: 20px">
<p style="font-size: 12px">Тестовый плагин</p>
</body>
    <script type="text/javascript">
        window.Asc.plugin.init = function()
        {           
            this.resizeWindow(400, 250, 400, 250, 400, 250);         
        };    
        window.Asc.plugin.button = function(id)
        {
            this.executeCommand("close", "");
        };
    </script>
</html> 
 <!DOCTYPE html>
<html lang="ru">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">         
        <style type="text/css">
            html, body {
                margin: 0px;
                padding: 0px;
                /* overflow: hidden; */
                width:100%;
                height:100%;
            }
        </style>                
       <script type="text/javascript" src="../v1/plugins.js"></script>   
        <script type="text/javascript" src="code.js"></script>
       <link rel="stylesheet" href="../v1/plugins.css"> 
        <script type="text/javascript" src="code.js"></script>
    </head>
    <body>      
        <div style="width: 100%;">          
            <button id="btn-1" style="width:100%;">Окрасить ячейку</button>
            <button id="btn-2" style="width:100%;">Создать окно</button>            
        </div>
    </body>
</html><body style="padding-left: 20px; padding-right: 20px">
    <button id="btn-close" style="width:100%;">Закрыть окно</button>
    <p style="font-size: 12px">Тестовый плагин</p>
</body><script type="text/javascript">               
        window.Asc.plugin.init = function()        
        {           
            document.getElementById('btn-close').addEventListener('click', function(){
                console.log("send 'onCancelMethod'");
                window.Asc.plugin.sendToPlugin("onWindowMessage", {type: 'onCancelMethod'});   
            });        
        };             
    </script>//Обработчик нажатия кнопки крестика закрытия в форме плагина
    window.Asc.plugin.button = function(id, windowId) {        
        if (windowId) {
            switch (id) {
                case -1:
                default:                                        
                    window.Asc.plugin.executeMethod('CloseWindow', [windowId]);
            }
        }       
    };
 
  
 <body>      
        <div style="width: 100%;">
            <textarea id ="txtOut" style="height:30px;width: 100%;" class="form-control" ></textarea>           
            <button id="btn-1" style="width:100%;">Окрасить ячейку</button>
            <button id="btn-2" style="width:100%;">Создать окно</button>            
        </div>
    </body>//универсальная функция диспетчер сообщений между окнами плагина
    function messageHandler(modal, message) {
        console.log("messageHandler "+ message.type);           
        switch (message.type) {
            case "onSalut":                     
                let txt=document.getElementById('txtOut').innerText=
                "Привет из модального окна"+"\n Полученные данные: \n"+message.data;
                break;                
            //Метод закрытия модального окна         
            case "onCancelMethod":
                window.Asc.plugin.executeMethod('CloseWindow',[modal.id]);
                break;          
        }
    };
<script type="text/javascript">               
        window.Asc.plugin.init = function()        
        {           
            document.getElementById('btn-close').addEventListener('click', function(){
                console.log("send 'onCancelMethod'");
                window.Asc.plugin.sendToPlugin("onWindowMessage", {type: 'onCancelMethod'});   
            });
            document.getElementById('btn-send').addEventListener('click', function(){
                console.log("send 'onCancelMethod'");
                window.Asc.plugin.sendToPlugin("onWindowMessage",
                 {type: 'onSalut',data:JSON.stringify({data1:"Data 1",data2:"2",})});   
            });
        };             
    </script>   
</head>
<body style="padding-left: 20px; padding-right: 20px">
    <button id="btn-close" style="width:100%;">Закрыть окно</button>
    <button id="btn-send" style="width:100%;">Послать сообщение</button>
    <p style="font-size: 12px">Тестовый плагин</p>
</body> 
 {
    "name" : "Плагин окрашивания ячейки",
    "guid" : "asc.{6401CE6B-3E19-45E1-9352-BFCF41989AA5}",
    "version": "0.0.1",
    "variations" : [
        {
            "description" : "Учебный плагин",
            "url"         : "index.html",
            "icons": [ "logo(64х64).png" ],                      
            "EditorsSupport"  : ["cell"],           
            
            "isViewer"        : true,
            "isVisual"        : true,
            "isModal"         : false,
            "isInsideMode"    : true,
            "initDataType"    : "",
            "initData"        : "",
            "isUpdateOleOnResize" : false,
            "buttons"         : []            
        }
    ]
}<!DOCTYPE html>
<html lang="ru">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
        
        <style type="text/css">
            html, body {
                margin: 0px;
                padding: 0px;
                /* overflow: hidden; */
                width:100%;
                height:100%;
            }
        </style>                
        <script src="../v1/plugins.js" type="text/javascript" ></script>
        <script src="../v1/plugins-ui.js" type="text/javascript"></script>      
        <script src="code.js" type="text/javascript"></script>
        <link href="../v1/plugins.css" rel="stylesheet">
    </head>
    <body>      
        <div style="width: 100%;">
            <textarea id ="txtOut" style="height:100px;width: 100%;" class="form-control" ></textarea>          
            <button id="btn-1" style="width:100%;">Окрасить ячейку</button>
            <button id="btn-2" style="width:100%;">Создать окно</button>            
        </div>
    </body>
</html>
(function(window, c=undefined){
    //Указатель на модальное окно плагина
    let modalWindow=null;
    //Функция API вызываемая редактором при инициализации плагина пользователем
    window.Asc.plugin.init = function()
    {
        //Средствами DOM назначим функцию changeColor на обработку нажатия на кнопку id=btn-1
        document.getElementById('btn-1').addEventListener('click', changeColor);
        //Средствами DOM назначим функцию changeColor на обработку нажатия на кнопку  id=btn-2
        document.getElementById('btn-2').addEventListener('click', createWindows);  
    };
    
    //Обработчки нажатия кнопки крестика закрытия в форме плагина
    window.Asc.plugin.button = function(id, windowId) {     
        
        if (windowId) {
            switch (id) {
                case -1:
                default:                                        
                    window.Asc.plugin.executeMethod('CloseWindow', [windowId]);
            }
        }       
    };
    function createWindows(){
        //Объект, по которому идёт загрузка файлов плагина
        let location  = window.location;
        //Путь к расположению плагина в файловой системе
        let start = location.pathname.lastIndexOf('/') + 1;
        //Имя текущего скрипт файла плагина 
        let file = location.pathname.substring(start);
        
        //Фактически описатель вариации окна "О программе" из config.json
        let variation = {
            description : 'About',
            url: location.href.replace(file,'about.html'),  
            icons : ['logo(64х64).png'],            
            EditorsSupport: ["cell"],   
            isVisual: true,
            isModal: true,              
            buttons:[ { "text": "Ok", "primary": true }],   
            size: [400, 250]
        };
        //Если окно не создавалось, то создаём его
        if (!modalWindow) {
            //функция АПИ, которая делает всю работу по созданию окна плагина
            modalWindow = new window.Asc.PluginWindow();
            //Присоединяем обработчик различных "оконных" событий для созданного окна
            modalWindow.attachEvent("onWindowMessage", function(message) {
            //Наша функция по обработке событий
                messageHandler(modalWindow, message);
            });
        }
        //Показываем модальное окно пользователю
        modalWindow.show(variation);
    }
    //универсальная функция диспетчер сообщений между окнами плагина
    function messageHandler(modal, message) {
        console.log("messageHandler "+ message.type);           
        switch (message.type) {
            case "onSalut":                     
                let txt=document.getElementById('txtOut').innerText=
                "Привет из модального окна"+"\n Полученные данные: \n"+message.data;
                break;
                
            //Метод закрытия модального окна         
            case "onCancelMethod":
                window.Asc.plugin.executeMethod('CloseWindow',[modal.id]);
                break;          
        }
    };
    //Сменить цвет ячейки (ячеек), которую перед вызовом функции выделил пользователь
    function changeColor(){
        //Создание "песочницы" js, в поторой происходит работа с документом
        window.Asc.plugin.callCommand(function() {          
            let oWorksheet =Api.GetActiveSheet();//Получить активный лист           
            let newColor=Api.CreateColorFromRGB(240, 240, 240);//Создать серый цвет
            if(oWorksheet!=undefined){
                let oActiveCell = oWorksheet.GetActiveCell();//Получить активную ячейку
                if(oActiveCell!=undefined){//Залить активную ячейку, если она существует
                    oActiveCell.SetFillColor(newColor);
                }
            }
        }, undefined,true);
    };    
})(window, undefined);<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>About</title>
    <style>
        p, a{
            font-size: 12px;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        }
    </style>
    <script type="text/javascript" src="../v1/plugins.js"></script>    
    <link rel="stylesheet" href="../v1/plugins.css"> 
    <script type="text/javascript">               
        window.Asc.plugin.init = function()        
        {           
            document.getElementById('btn-close').addEventListener('click', function(){
                console.log("send 'onCancelMethod'");
                window.Asc.plugin.sendToPlugin("onWindowMessage", {type: 'onCancelMethod'});   
            });
            document.getElementById('btn-send').addEventListener('click', function(){
                console.log("send 'onCancelMethod'");
                window.Asc.plugin.sendToPlugin("onWindowMessage",
                 {type: 'onSalut',data:JSON.stringify({data1:"Data 1",data2:"2",})});   
            });
        };             
    </script>   
</head>
<body style="padding-left: 20px; padding-right: 20px">
    <button id="btn-close" style="width:100%;">Закрыть окно</button>
    <button id="btn-send" style="width:100%;">Послать сообщение</button>
    <p style="font-size: 12px">Тестовый плагин</p>
</body>
    
</html>