annotate WebContent/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js @ 6:5bb7cc86069c

restlet.jar
author dwinter
date Wed, 14 Mar 2012 16:21:45 +0100
parents 0be9d53a6967
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
1 /**
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
2 * editor_plugin_src.js
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
3 *
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
4 * Copyright 2009, Moxiecode Systems AB
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
5 * Released under LGPL License.
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
6 *
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
7 * License: http://tinymce.moxiecode.com/license
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
8 * Contributing: http://tinymce.moxiecode.com/contributing
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
9 */
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
10
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
11 (function() {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
12 tinymce.create('tinymce.plugins.AdvancedImagePlugin', {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
13 init : function(ed, url) {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
14 // Register commands
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
15 ed.addCommand('mceAdvImage', function() {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
16 // Internal image object like a flash placeholder
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
17 if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1)
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
18 return;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
19
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
20 ed.windowManager.open({
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
21 file : url + '/image.htm',
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
22 width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)),
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
23 height : 385 + parseInt(ed.getLang('advimage.delta_height', 0)),
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
24 inline : 1
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
25 }, {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
26 plugin_url : url
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
27 });
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
28 });
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
29
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
30 // Register buttons
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
31 ed.addButton('image', {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
32 title : 'advimage.image_desc',
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
33 cmd : 'mceAdvImage'
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
34 });
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
35 },
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
36
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
37 getInfo : function() {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
38 return {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
39 longname : 'Advanced image',
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
40 author : 'Moxiecode Systems AB',
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
41 authorurl : 'http://tinymce.moxiecode.com',
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
42 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
43 version : tinymce.majorVersion + "." + tinymce.minorVersion
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
44 };
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
45 }
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
46 });
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
47
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
48 // Register plugin
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
49 tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin);
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
50 })();