annotate media/js/tiny_mce/plugins/advimage/editor_plugin_src.js @ 132:06503edcc56b

A previous commit broke the comment preview function. Fixing this now.
author Brian Neal <bgneal@gmail.com>
date Thu, 26 Nov 2009 22:51:07 +0000
parents a5b4c5ce0658
children 149c3567fec1
rev   line source
bgneal@45 1 /**
bgneal@45 2 * $Id: editor_plugin_src.js 677 2008-03-07 13:52:41Z spocke $
bgneal@45 3 *
bgneal@45 4 * @author Moxiecode
bgneal@45 5 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
bgneal@45 6 */
bgneal@45 7
bgneal@45 8 (function() {
bgneal@45 9 tinymce.create('tinymce.plugins.AdvancedImagePlugin', {
bgneal@45 10 init : function(ed, url) {
bgneal@45 11 // Register commands
bgneal@45 12 ed.addCommand('mceAdvImage', function() {
bgneal@45 13 // Internal image object like a flash placeholder
bgneal@45 14 if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1)
bgneal@45 15 return;
bgneal@45 16
bgneal@45 17 ed.windowManager.open({
bgneal@45 18 file : url + '/image.htm',
bgneal@45 19 width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)),
bgneal@45 20 height : 385 + parseInt(ed.getLang('advimage.delta_height', 0)),
bgneal@45 21 inline : 1
bgneal@45 22 }, {
bgneal@45 23 plugin_url : url
bgneal@45 24 });
bgneal@45 25 });
bgneal@45 26
bgneal@45 27 // Register buttons
bgneal@45 28 ed.addButton('image', {
bgneal@45 29 title : 'advimage.image_desc',
bgneal@45 30 cmd : 'mceAdvImage'
bgneal@45 31 });
bgneal@45 32 },
bgneal@45 33
bgneal@45 34 getInfo : function() {
bgneal@45 35 return {
bgneal@45 36 longname : 'Advanced image',
bgneal@45 37 author : 'Moxiecode Systems AB',
bgneal@45 38 authorurl : 'http://tinymce.moxiecode.com',
bgneal@45 39 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',
bgneal@45 40 version : tinymce.majorVersion + "." + tinymce.minorVersion
bgneal@45 41 };
bgneal@45 42 }
bgneal@45 43 });
bgneal@45 44
bgneal@45 45 // Register plugin
bgneal@45 46 tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin);
bgneal@45 47 })();