Ticket #6646: 6646.patch
File 6646.patch, 2.6 KB (added by , 13 years ago) |
---|
-
_source/plugins/htmldataprocessor/plugin.js
250 250 251 251 function protectReadOnly( element ) 252 252 { 253 element.attributes.contenteditable = "false"; 253 var attrs = element.attributes; 254 // We should flag that the element was locked by our code so 255 // it'll be editable by the editor functions (#6046). 256 if ( attrs.contenteditable != "false" ) 257 attrs[ '_cke_editable' ] = attrs.contenteditable? true : 1; 258 259 attrs.contenteditable = "false"; 254 260 } 261 255 262 function unprotectReadyOnly( element ) 256 263 { 257 delete element.attributes.contenteditable; 258 } 264 var attrs = element.attributes; 265 switch( attrs[ '_cke_editable' ] ) 266 { 267 case 'true' : attrs.contenteditable = true; break; 268 case '1' : delete attrs.contenteditable; 269 } 270 271 delete attrs[ '_cke_editable' ]; 272 } 259 273 // Disable form elements editing mode provided by some browers. (#5746) 260 274 for ( i in { input : 1, textarea : 1 } ) 261 275 { -
_source/core/dom/node.js
666 666 { 667 667 if ( current.type == CKEDITOR.NODE_ELEMENT ) 668 668 { 669 if ( current.is( 'body' ) || current.get CustomData( '_cke_notReadOnly' ) )669 if ( current.is( 'body' ) || current.getAttribute( '_cke_editable' ) ) 670 670 break; 671 671 672 672 if ( current.getAttribute( 'contentEditable' ) == 'false' ) -
_source/plugins/wysiwygarea/plugin.js
1047 1047 if ( element.type == CKEDITOR.NODE_ELEMENT 1048 1048 && ( element.is( 'input' ) || element.is( 'textarea' ) ) ) 1049 1049 { 1050 if ( !element.isReadOnly() )1051 {1052 element.setAttribute( 'contentEditable', false );1053 // We should flag that the element was locked by our code so1054 // it'll be editable by the editor functions (#6046).1055 element.setCustomData( '_cke_notReadOnly', 1 ); 1056 }1057 } 1050 // We should flag that the element was locked by our code so 1051 // it'll be editable by the editor functions (#6046). 1052 if ( !element.isReadOnly() ) 1053 element.setAttribute( '_cke_editable', 1054 element.hasAttribute( 'contenteditable' ) ? true : 1 ); 1055 1056 element.setAttribute( 'contentEditable', false ); 1057 } 1058 1058 }); 1059 1059 1060 1060 }