alecpl
2008-10-09 e70b3b24fc8ac7b54a820ae87ce8f4af4043125e
commit | author | age
a0109c 1 /**
d9344f 2  * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
a0109c 3  *
S 4  * @author Moxiecode
d9344f 5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
a0109c 6  */
S 7
d9344f 8 (function() {
S 9     tinymce.create('tinymce.plugins.EmotionsPlugin', {
10         init : function(ed, url) {
11             // Register commands
12             ed.addCommand('mceEmotion', function() {
13                 ed.windowManager.open({
14                     file : url + '/emotions.htm',
15                     width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)),
16                     height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)),
17                     inline : 1
18                 }, {
19                     plugin_url : url
20                 });
21             });
a0109c 22
d9344f 23             // Register buttons
S 24             ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'});
25         },
a0109c 26
d9344f 27         getInfo : function() {
S 28             return {
29                 longname : 'Emotions',
30                 author : 'Moxiecode Systems AB',
31                 authorurl : 'http://tinymce.moxiecode.com',
32                 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',
33                 version : tinymce.majorVersion + "." + tinymce.minorVersion
34             };
a0109c 35         }
d9344f 36     });
a0109c 37
d9344f 38     // Register plugin
S 39     tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin);
40 })();