2 * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
\r
5 * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
\r
8 /* Import plugin specific language pack */
\r
9 tinyMCE.importPluginLanguagePack('emotions');
\r
11 // Plucin static class
\r
12 var TinyMCE_EmotionsPlugin = {
\r
13 getInfo : function() {
\r
15 longname : 'Emotions',
\r
16 author : 'Moxiecode Systems AB',
\r
17 authorurl : 'http://tinymce.moxiecode.com',
\r
18 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',
\r
19 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
\r
24 * Returns the HTML contents of the emotions control.
\r
26 getControlHTML : function(cn) {
\r
29 return tinyMCE.getButtonHTML(cn, 'lang_emotions_desc', '{$pluginurl}/images/emotions.gif', 'mceEmotion');
\r
36 * Executes the mceEmotion command.
\r
38 execCommand : function(editor_id, element, command, user_interface, value) {
\r
42 var template = new Array();
\r
44 template['file'] = '../../plugins/emotions/emotions.htm'; // Relative to theme
\r
45 template['width'] = 250;
\r
46 template['height'] = 160;
\r
48 // Language specific width and height addons
\r
49 template['width'] += tinyMCE.getLang('lang_emotions_delta_width', 0);
\r
50 template['height'] += tinyMCE.getLang('lang_emotions_delta_height', 0);
\r
52 tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
\r
57 // Pass to next handler in chain
\r
63 tinyMCE.addPlugin('emotions', TinyMCE_EmotionsPlugin);
\r