/* arkemoticons v 1.0 * (c) Alexander Karataev 10/2014 * ddw2@yandex.ru */ tinymce.PluginManager.add('arkemoticonssk', function(editor, url) { var arkskype = [ ["01", "02", "03", "04", "05", "06"], ["07", "08", "09", "10", "11", "12"], ["13", "14", "15", "16", "17", "18"], ["19", "20", "21", "22"] ]; function getHtml() { var arkskypeHtml; arkskypeHtml = ''; tinymce.each(arkskype, function(row) { arkskypeHtml += ''; tinymce.each(row, function(icon) { var arkskypeUrl = url + '/img/' + icon + '.gif'; arkskypeHtml += ''; }); arkskypeHtml += ''; }); arkskypeHtml += '
'; return arkskypeHtml; } editor.addButton('arkemoticonssk', { type: 'panelbutton', panel: { role: 'application', autohide: true, html: getHtml, onclick: function(e) { var linkElm = editor.dom.getParent(e.target, 'a'); if (linkElm) { editor.insertContent( '' + linkElm.getAttribute('data-mce-alt') + '' ); //this.hide(); } } }, tooltip: 'Smile Skype', image: url + '/img/smile.jpg' }); });