includes/clientside/tinymce/plugins/advimage/editor_plugin_src.js
changeset 543 dffcbfbc4e59
parent 395 fa4c5ecb7c9a
equal deleted inserted replaced
542:5841df0ab575 543:dffcbfbc4e59
     1 /**
     1 /**
     2  * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
     2  * $Id: editor_plugin_src.js 677 2008-03-07 13:52:41Z spocke $
     3  *
     3  *
     4  * @author Moxiecode
     4  * @author Moxiecode
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     6  */
     6  */
     7 
     7 
     8 (function() {
     8 (function() {
     9 	tinymce.create('tinymce.plugins.AdvancedImagePlugin', {
     9 	tinymce.create('tinymce.plugins.AdvancedImagePlugin', {
    10 		init : function(ed, url) {
    10 		init : function(ed, url) {
    11 			// Register commands
    11 			// Register commands
    12 			ed.addCommand('mceAdvImage', function() {
    12 			ed.addCommand('mceAdvImage', function() {
    13 				var e = ed.selection.getNode();
       
    14 
       
    15 				// Internal image object like a flash placeholder
    13 				// Internal image object like a flash placeholder
    16 				if (ed.dom.getAttrib(e, 'class').indexOf('mceItem') != -1)
    14 				if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1)
    17 					return;
    15 					return;
    18 
    16 
    19 				ed.windowManager.open({
    17 				ed.windowManager.open({
    20 					file : url + '/image.htm',
    18 					file : url + '/image.htm',
    21 					width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)),
    19 					width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)),