source: branches/rsr.v5.1/web/app/plugins/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js @ 1

Last change on this file since 1 was 1, checked in by dj3c1t, 12 years ago

import initial

File size: 1.3 KB
Line 
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.AdvancedImagePlugin', {
10                init : function(ed, url) {
11                        // Register commands
12                        ed.addCommand('mceAdvImage', function() {
13                                var e = ed.selection.getNode();
14
15                                // Internal image object like a flash placeholder
16                                if (ed.dom.getAttrib(e, 'class').indexOf('mceItem') != -1)
17                                        return;
18
19                                ed.windowManager.open({
20                                        file : url + '/image.htm',
21                                        width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)),
22                                        height : 385 + parseInt(ed.getLang('advimage.delta_height', 0)),
23                                        inline : 1
24                                }, {
25                                        plugin_url : url
26                                });
27                        });
28
29                        // Register buttons
30                        ed.addButton('image', {
31                                title : 'advimage.image_desc',
32                                cmd : 'mceAdvImage'
33                        });
34                },
35
36                getInfo : function() {
37                        return {
38                                longname : 'Advanced image',
39                                author : 'Moxiecode Systems AB',
40                                authorurl : 'http://tinymce.moxiecode.com',
41                                infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',
42                                version : tinymce.majorVersion + "." + tinymce.minorVersion
43                        };
44                }
45        });
46
47        // Register plugin
48        tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin);
49})();
Note: See TracBrowser for help on using the repository browser.