X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fcore%2Fdom%2Felement.js;h=84498ba72b4080b372777ac9cfe8155f12826e87;hp=c83674ab405ebf54b9778ffdc6acdaced3c50a96;hb=6e682412d5cc0dfaedb376482e585bf2989c6863;hpb=2f22c0c38f17e75be5541089076885442aaa2377 diff --git a/_source/core/dom/element.js b/_source/core/dom/element.js index c83674a..84498ba 100644 --- a/_source/core/dom/element.js +++ b/_source/core/dom/element.js @@ -466,6 +466,11 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, case 'style': // IE does not return inline styles via getAttribute(). See #2947. return this.$.style.cssText; + + case 'contenteditable': + case 'contentEditable': + return this.$.attributes.getNamedItem( 'contentEditable' ).specified ? + this.$.getAttribute( 'contentEditable' ) : null; } return standard.call( this, name ); @@ -731,7 +736,8 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, || this.getComputedStyle( 'display' ) == 'none' || this.getComputedStyle( 'visibility' ) == 'hidden' || this.is( 'a' ) && this.data( 'cke-saved-name' ) && !this.getChildCount() - || CKEDITOR.dtd.$nonEditable[ name ] ) + || CKEDITOR.dtd.$nonEditable[ name ] + || CKEDITOR.dtd.$empty[ name ] ) { return false; } @@ -1069,6 +1075,8 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, this.$.tabIndex = value; else if ( name == 'checked' ) this.$.checked = value; + else if ( name == 'contenteditable' ) + standard.call( this, 'contentEditable', value ); else standard.apply( this, arguments ); return this; @@ -1143,6 +1151,8 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, name = 'className'; else if ( name == 'tabindex' ) name = 'tabIndex'; + else if ( name == 'contenteditable' ) + name = 'contentEditable'; standard.call( this, name ); }; } @@ -1174,9 +1184,9 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, */ removeStyle : function( name ) { - this.setStyle( name, '' ); - if ( this.$.style.removeAttribute ) - this.$.style.removeAttribute( CKEDITOR.tools.cssStyleToDomStyle( name ) ); + // Removes the specified property from the current style object. + var $ = this.$.style; + $.removeProperty ? $.removeProperty( name ) : $.removeAttribute( CKEDITOR.tools.cssStyleToDomStyle( name ) ); if ( !this.$.style.cssText ) this.removeAttribute( 'style' ); @@ -1227,7 +1237,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, */ setOpacity : function( opacity ) { - if ( CKEDITOR.env.ie ) + if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 ) { opacity = Math.round( opacity * 100 ); this.setStyle( 'filter', opacity >= 100 ? '' : 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + opacity + ')' );