Ticket #1659: 1659_5.patch
File 1659_5.patch, 3.4 KB (added by , 15 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
115 115 } 116 116 } 117 117 118 function styleStringsToNumber( styleStrings ) 119 { 120 var sum = 0; 121 for ( var i = 0 ; i < styleStrings.length ; i++ ) 122 sum += parseInt( styleStrings[ i ], 10 ) || 0; 123 return sum; 124 } 125 118 126 CKEDITOR.plugins.add( 'wysiwygarea', 119 127 { 120 128 requires : [ 'editingblock' ], … … 247 255 body.disabled = true; 248 256 body.contentEditable = true; 249 257 body.removeAttribute( 'disabled' ); 258 259 // #1659: Editing area should fill the editable frame in IE (IE7+ part). 260 if ( CKEDITOR.env.version >= 7 && domDocument.compatMode == 'CSS1Compat' ) 261 { 262 263 var resizeFunc = CKEDITOR.tools.bind( function() 264 { 265 var htmlStyles = this.documentElement.currentStyle; 266 var bodyStyles = this.body.currentStyle; 267 var margin = styleStringsToNumber( [ htmlStyles.marginTop, htmlStyles.marginBottom, 268 bodyStyles.marginTop, bodyStyles.marginBottom ] ); 269 var border = styleStringsToNumber( [ htmlStyles.borderTopWidth, htmlStyles.borderBottomWidth, 270 bodyStyles.borderTopWidth, bodyStyles.borderBottomWidth ] ); 271 var padding = styleStringsToNumber( [ htmlStyles.paddingTop, htmlStyles.paddingBottom, 272 bodyStyles.paddingTop, bodyStyles.paddingBottom ] ); 273 274 // For IE8 only: 275 // The body tag in IE8 may take the natural top margin of a <p> tag 276 // into the body margin. 277 if ( CKEDITOR.env.version >= 8 ) 278 { 279 var paragraphs = this.getElementsByTagName( 'p' ); 280 if ( paragraphs.length > 0 ) 281 { 282 var block = paragraphs[ 0 ]; 283 margin += block.offsetTop || 0; 284 } 285 } 286 287 this.body.runtimeStyle.minHeight = ( this.documentElement.clientHeight - margin - border - padding ) + 'px'; 288 }, domDocument ); 289 290 domWindow.attachEvent( 'onresize', resizeFunc ); 291 resizeFunc(); 292 } 250 293 } 251 294 else 252 295 domDocument.designMode = 'on'; … … 329 372 } 330 373 }, 331 374 0 ); 375 376 // Avoid memory leaks - we're dealing with raw DOM nodes here. 377 body = null; 332 378 }; 333 379 334 380 editor.addMode( 'wysiwyg', -
_source/core/dom/element.js
1354 1354 getChildCount : function() 1355 1355 { 1356 1356 return this.$.childNodes.length; 1357 }, 1358 1357 } 1359 1358 }); -
contents.css
2 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 4 */ 5 5 html 6 { 7 /* #1569 fix for IE6 */ 8 _padding: 10px; 9 } 6 10 body 7 11 { 8 12 /* Font */ … … 14 18 15 19 /* Remove the background color to make it transparent */ 16 20 background-color: #fff; 21 22 /* #1569 fix for IE6 */ 23 _margin: 0px; 24 _height: 100%; 17 25 } 18 26 img:-moz-broken 19 27 {