PageRenderTime 102ms CodeModel.GetById 60ms app.highlight 3ms RepoModel.GetById 37ms app.codeStats 0ms

/static/scripts/tiny_mce/plugins/emotions/editor_plugin_src.js

http://n23.googlecode.com/
JavaScript | 40 lines | 27 code | 4 blank | 9 comment | 0 complexity | 737b27ed94b60574160a622124954574 MD5 | raw file
 1/**
 2 * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
 3 *
 4 * @author Moxiecode
 5 * @copyright Copyright Š 2004-2008, Moxiecode Systems AB, All rights reserved.
 6 */
 7
 8(function() {
 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			});
22
23			// Register buttons
24			ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'});
25		},
26
27		getInfo : function() {
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			};
35		}
36	});
37
38	// Register plugin
39	tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin);
40})();