Ticket #3728: 3728.patch
File 3728.patch, 843 bytes (added by , 15 years ago) |
---|
-
_source/plugins/colorbutton/plugin.js
66 66 67 67 panel.hide(); 68 68 69 var style = new CKEDITOR.style( config['colorButton_' + type + 'Style'], { color : color || '#000' } ); 69 var removeColor = null; 70 if ( !color ) 71 { 72 var element = editor.getSelection().getStartElement(); 73 removeColor = element .getComputedStyle( type == 'back' ? 'background-color' : 'color' ); 74 } 70 75 76 var style = new CKEDITOR.style( config[ 'colorButton_' + type + 'Style' ], { color : color || removeColor } ); 77 71 78 editor.fire( 'saveSnapshot' ); 72 79 if ( color ) 73 80 style.apply( editor.document );