Mercurial > public > sg101
comparison media/js/tiny_mce/plugins/advimage/editor_plugin_src.js @ 45:a5b4c5ce0658
Breaking down and controlling all media files, including javascript libraries.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 19 Jun 2009 03:16:03 +0000 |
parents | |
children | 149c3567fec1 |
comparison
equal
deleted
inserted
replaced
44:08cd19c1ee50 | 45:a5b4c5ce0658 |
---|---|
1 /** | |
2 * $Id: editor_plugin_src.js 677 2008-03-07 13:52:41Z 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 // Internal image object like a flash placeholder | |
14 if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1) | |
15 return; | |
16 | |
17 ed.windowManager.open({ | |
18 file : url + '/image.htm', | |
19 width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)), | |
20 height : 385 + parseInt(ed.getLang('advimage.delta_height', 0)), | |
21 inline : 1 | |
22 }, { | |
23 plugin_url : url | |
24 }); | |
25 }); | |
26 | |
27 // Register buttons | |
28 ed.addButton('image', { | |
29 title : 'advimage.image_desc', | |
30 cmd : 'mceAdvImage' | |
31 }); | |
32 }, | |
33 | |
34 getInfo : function() { | |
35 return { | |
36 longname : 'Advanced image', | |
37 author : 'Moxiecode Systems AB', | |
38 authorurl : 'http://tinymce.moxiecode.com', | |
39 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage', | |
40 version : tinymce.majorVersion + "." + tinymce.minorVersion | |
41 }; | |
42 } | |
43 }); | |
44 | |
45 // Register plugin | |
46 tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin); | |
47 })(); |