Ticket #3749: 3749.patch
File 3749.patch, 1.0 KB (added by , 15 years ago) |
---|
-
_source/plugins/clipboard/plugin.js
187 187 // If the "contextmenu" plugin is loaded, register the listeners. 188 188 if ( editor.contextMenu ) 189 189 { 190 function stateFromNamedCommand( command ) 191 { 192 return editor.document.$.queryCommandEnabled( command ) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED; 193 } 194 190 195 editor.contextMenu.addListener( function() 191 196 { 192 197 return { 193 cut : CKEDITOR.TRISTATE_DISABLED , 194 copy : CKEDITOR.TRISTATE_DISABLED, 195 paste : CKEDITOR.TRISTATE_DISABLED }; 198 cut : stateFromNamedCommand( 'Cut' ), 199 200 // Browser bug: 'Cut' has the correct states for both Copy and Cut. 201 copy : stateFromNamedCommand( 'Cut' ), 202 paste : stateFromNamedCommand( 'Paste' ) 203 }; 196 204 }); 197 205 } 198 206 }