/static/scripts/tiny_mce/plugins/emotions/js/emotions.js
JavaScript | 22 lines | 17 code | 5 blank | 0 comment | 0 complexity | ca781c5bd11767e1bbd86934343d7d0e MD5 | raw file
Possible License(s): Apache-2.0, LGPL-2.1
1tinyMCEPopup.requireLangPack(); 2 3var EmotionsDialog = { 4 init : function(ed) { 5 tinyMCEPopup.resizeToInnerSize(); 6 }, 7 8 insert : function(file, title) { 9 var ed = tinyMCEPopup.editor, dom = ed.dom; 10 11 tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('img', { 12 src : tinyMCEPopup.getWindowArg('plugin_url') + '/img/' + file, 13 alt : ed.getLang(title), 14 title : ed.getLang(title), 15 border : 0 16 })); 17 18 tinyMCEPopup.close(); 19 } 20}; 21 22tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog);