1 /* Import plugin specific language pack */
\r
2 tinyMCE.importPluginLanguagePack('emotions', 'en,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');
\r
4 function TinyMCE_emotions_getInfo() {
\r
6 longname : 'Emotions',
\r
7 author : 'Moxiecode Systems',
\r
8 authorurl : 'http://tinymce.moxiecode.com',
\r
9 infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_emotions.html',
\r
10 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
\r
15 * Returns the HTML contents of the emotions control.
\r
17 function TinyMCE_emotions_getControlHTML(control_name) {
\r
18 switch (control_name) {
\r
20 var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceEmotion\');return false;';
\r
21 return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_emotions" src="{$pluginurl}/images/emotions.gif" title="{$lang_emotions_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
\r
28 * Executes the mceEmotion command.
\r
30 function TinyMCE_emotions_execCommand(editor_id, element, command, user_interface, value) {
\r
34 var template = new Array();
\r
36 template['file'] = '../../plugins/emotions/emotions.htm'; // Relative to theme
\r
37 template['width'] = 160;
\r
38 template['height'] = 160;
\r
40 // Language specific width and height addons
\r
41 template['width'] += tinyMCE.getLang('lang_emotions_delta_width', 0);
\r
42 template['height'] += tinyMCE.getLang('lang_emotions_delta_height', 0);
\r
44 tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
\r
49 // Pass to next handler in chain
\r