- // Style object for highlights.\r
- var highlightStyle = new CKEDITOR.style( editor.config.find_highlight );\r
+ // Style object for highlights: (#5018)\r
+ // 1. Defined as full match style to avoid compromising ordinary text color styles.\r
+ // 2. Must be apply onto inner-most text to avoid conflicting with ordinary text color styles visually.\r
+ var highlightStyle = new CKEDITOR.style(\r
+ CKEDITOR.tools.extend( { attributes : { 'data-cke-highlight': 1 }, fullMatch : 1, ignoreReadonly : 1, childRule : function(){ return 0; } },\r
+ editor.config.find_highlight, true ) );\r