var iframeNode = editor.restoreRealElement( fakeImage );\r
this.iframeNode = iframeNode;\r
\r
- this.setupContent( iframeNode, fakeImage );\r
+ this.setupContent( iframeNode );\r
}\r
},\r
onOk : function()\r
style : 'width:100%',\r
labelLayout : 'vertical',\r
label : commonLang.width,\r
- validate : CKEDITOR.dialog.validate.integer( commonLang.invalidWidth ),\r
- setup : function( iframeNode, fakeImage )\r
- {\r
- loadValue.apply( this, arguments );\r
- if ( fakeImage )\r
- {\r
- var fakeImageWidth = parseInt( fakeImage.$.style.width, 10 );\r
- if ( !isNaN( fakeImageWidth ) )\r
- this.setValue( fakeImageWidth );\r
- }\r
- },\r
- commit : function( iframeNode, extraStyles )\r
- {\r
- commitValue.apply( this, arguments );\r
- if ( this.getValue() )\r
- extraStyles.width = this.getValue() + 'px';\r
- }\r
+ validate : CKEDITOR.dialog.validate.htmlLength( commonLang.invalidHtmlLength.replace( '%1', commonLang.width ) ),\r
+ setup : loadValue,\r
+ commit : commitValue\r
},\r
{\r
id : 'height',\r
style : 'width:100%',\r
labelLayout : 'vertical',\r
label : commonLang.height,\r
- validate : CKEDITOR.dialog.validate.integer( commonLang.invalidHeight ),\r
- setup : function( iframeNode, fakeImage )\r
- {\r
- loadValue.apply( this, arguments );\r
- if ( fakeImage )\r
- {\r
- var fakeImageHeight = parseInt( fakeImage.$.style.height, 10 );\r
- if ( !isNaN( fakeImageHeight ) )\r
- this.setValue( fakeImageHeight );\r
- }\r
- },\r
- commit : function( iframeNode, extraStyles )\r
- {\r
- commitValue.apply( this, arguments );\r
- if ( this.getValue() )\r
- extraStyles.height = this.getValue() + 'px';\r
- }\r
+ validate : CKEDITOR.dialog.validate.htmlLength( commonLang.invalidHtmlLength.replace( '%1', commonLang.height ) ),\r
+ setup : loadValue,\r
+ commit : commitValue\r
},\r
{\r
id : 'align',\r