Ticket #6646: 6646_2.patch
File 6646_2.patch, 2.6 KB (added by , 13 years ago) |
---|
-
_source/core/dom/node.js
679 679 { 680 680 if ( current.type == CKEDITOR.NODE_ELEMENT ) 681 681 { 682 if ( current.is( 'body' ) || current.getCustomData( '_cke_notReadOnly' ) )682 if ( current.is( 'body' ) || !!current.data( 'cke-editable' ) ) 683 683 break; 684 684 685 685 if ( current.getAttribute( 'contentEditable' ) == 'false' ) -
_source/plugins/htmldataprocessor/plugin.js
260 260 261 261 function protectReadOnly( element ) 262 262 { 263 element.attributes.contenteditable = "false"; 263 var attrs = element.attributes; 264 265 // We should flag that the element was locked by our code so 266 // it'll be editable by the editor functions (#6046). 267 if ( attrs.contenteditable != "false" ) 268 attrs[ 'data-cke-editable' ] = attrs.contenteditable ? 'true' : 1; 269 270 attrs.contenteditable = "false"; 264 271 } 265 272 function unprotectReadyOnly( element ) 266 273 { 267 delete element.attributes.contenteditable; 274 var attrs = element.attributes; 275 switch( attrs[ 'data-cke-editable' ] ) 276 { 277 case 'true': attrs.contenteditable = 'true'; break; 278 case '1': delete attrs.contenteditable; break; 279 } 268 280 } 269 281 // Disable form elements editing mode provided by some browers. (#5746) 270 282 for ( i in { input : 1, textarea : 1 } ) -
_source/plugins/wysiwygarea/plugin.js
1125 1125 if ( element.type == CKEDITOR.NODE_ELEMENT 1126 1126 && ( element.is( 'input' ) || element.is( 'textarea' ) ) ) 1127 1127 { 1128 // We should flag that the element was locked by our code so 1129 // it'll be editable by the editor functions (#6046). 1128 1130 if ( !element.isReadOnly() ) 1129 { 1130 element.setAttribute( 'contentEditable', false ); 1131 // We should flag that the element was locked by our code so 1132 // it'll be editable by the editor functions (#6046). 1133 element.setCustomData( '_cke_notReadOnly', 1 ); 1134 } 1131 element.data( 'cke-editable', element.hasAttribute( 'contenteditable' ) ? 'true' : '1' ); 1132 element.setAttribute( 'contentEditable', false ); 1135 1133 } 1136 1134 }); 1137 1135