// JavaScript Document (function() { tinymce.PluginManager.add('true_mce_button_featured_big', function( editor, url ) { // id кнопки true_mce_button должен быть везде один и тот же editor.addButton( 'true_mce_button_featured_big', { // id кнопки true_mce_button icon: ' fa fa-cube', // мой собственный CSS класс, благодаря которому я задам иконку кнопки type: 'menubutton', title: 'Add Big Featured Box', // всплывающая подсказка при наведении menu: [ // тут начинается первый выпадающий список { // первый элемент первого выпадающего списка text: 'Add Big Featured Box', onclick: function() { editor.windowManager.open( { title: 'Set the parameters of the BIG Featured Box', body: [ { type: 'textbox', // тип listbox = выпадающий список select name: 'name', label: 'Name BIG Block Featured', value: '' // значение по умолчанию }, { type: 'textbox', // тип listbox = выпадающий список select name: 'link', label: 'Link Block', value: '#' // значение по умолчанию }, { type: 'listbox', // тип listbox = выпадающий список select name: 'icon', label: 'Select Icon', 'values': [ // значения выпадающего списка {text: '', value: ''}, // лейбл, значение {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, {text: '', value: ''}, ] }, { type: 'textbox', // тип listbox = выпадающий список select name: 'description', label: 'Description Block', value: 'recommended 200 symbols', // значение по умолчанию multiline: true, // большое текстовое поле - textarea minWidth: 300, // минимальная ширина в пикселях minHeight: 100 // минимальная высота в пикселях }, { type: 'textbox', // тип listbox = выпадающий список select name: 'backcolor', label: 'Background Color Icon', value: '#3bc0c3' // значение по умолчанию }, ], onsubmit: function( e ) { // это будет происходить после заполнения полей и нажатии кнопки отправки editor.insertContent( '
'); } }); }, }, { // второй элемент первого выпадающего списка // text: 'Delete this Block', // onclick: function() { // editor.remove('table'); // } } ] }); }); })();