maj version dans config.xml
[mtweb] / mw / libs / tiny_mce / plugins / advimage / editor_plugin_src.js
1 /**\r
2  * editor_plugin_src.js\r
3  *\r
4  * Copyright 2009, Moxiecode Systems AB\r
5  * Released under LGPL License.\r
6  *\r
7  * License: http://tinymce.moxiecode.com/license\r
8  * Contributing: http://tinymce.moxiecode.com/contributing\r
9  */\r
10 \r
11 (function() {\r
12         tinymce.create('tinymce.plugins.AdvancedImagePlugin', {\r
13                 init : function(ed, url) {\r
14                         // Register commands\r
15                         ed.addCommand('mceAdvImage', function() {\r
16                                 // Internal image object like a flash placeholder\r
17                                 if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1)\r
18                                         return;\r
19 \r
20                                 ed.windowManager.open({\r
21                                         file : url + '/image.htm',\r
22                                         width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)),\r
23                                         height : 385 + parseInt(ed.getLang('advimage.delta_height', 0)),\r
24                                         inline : 1\r
25                                 }, {\r
26                                         plugin_url : url\r
27                                 });\r
28                         });\r
29 \r
30                         // Register buttons\r
31                         ed.addButton('image', {\r
32                                 title : 'advimage.image_desc',\r
33                                 cmd : 'mceAdvImage'\r
34                         });\r
35                 },\r
36 \r
37                 getInfo : function() {\r
38                         return {\r
39                                 longname : 'Advanced image',\r
40                                 author : 'Moxiecode Systems AB',\r
41                                 authorurl : 'http://tinymce.moxiecode.com',\r
42                                 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',\r
43                                 version : tinymce.majorVersion + "." + tinymce.minorVersion\r
44                         };\r
45                 }\r
46         });\r
47 \r
48         // Register plugin\r
49         tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin);\r
50 })();