[Rt-commit] rt branch, 5.0/fix-rich-text-styles-dark-theme, repushed
? sunnavy
sunnavy at bestpractical.com
Mon Jun 15 21:18:11 EDT 2020
The branch 5.0/fix-rich-text-styles-dark-theme was deleted and repushed:
was d616f40ec2e6954e3755c7291d2f1809e908218b
now 7859f3e8bdf3cd0be37169009c2bd05a44fbd7c8
1: 0b96decd17 = 1: 0b96decd17 Fix background colors for ckeditor darkmode
2: 09712d90a5 = 2: 09712d90a5 Fix borders for ckeditor darkmode
3: 4e84b0f2b0 = 3: 4e84b0f2b0 Fix toolbar text color for ckeditor darkmode
4: fc99f872f2 = 4: fc99f872f2 Fix toolbar icon color for ckeditor darkmode
5: 8347e64ca7 = 5: 8347e64ca7 Fix borders of styles/formats for ckeditor darkmode
6: 5bf216ba74 = 6: 5bf216ba74 Fix toolbar dropdown color for ckeditor darkmode
7: 7c4ef30ee6 = 7: 7c4ef30ee6 Drop jquery.event.hover-1.0.js
8: b4bcfa18fc ! 8: 1d8d664b5d Fix colors in "More colors" modal for ckeditor darkmode
@@ -15,22 +15,28 @@
+ jQuery('body').on('DOMNodeInserted', '.cke_dialog_container', function(e) {
+ if ( !jQuery(e.target).find('.ColorCell:visible').length ) return;
+
++ // Override global dark bg color
+ jQuery(e.target).find('.ColorCell:visible').each(function() {
+ var style = jQuery(this).attr('style').replace(/background-color:([^;]+);/, 'background-color: $1 !important');
+ jQuery(this).attr('style', style);
+ });
+
-+ // Sync active color
-+ jQuery('.ColorCell:visible').hover(function() {
-+ var bg = jQuery(this).css('background-color');
++ // Sync highlight color on hover
++ var sync_highlight = function(e) {
++ var bg = jQuery(e).css('background-color');
+ setTimeout(function() {
+ var style = jQuery('[id^=cke_][id$=_hicolor]:visible').attr('style').replace(/background-color:[^;]+;/, 'background-color: ' + bg + ' !important');
+ jQuery('[id^=cke_][id$=_hicolor]:visible').attr('style', style);
+ }, 0);
++ };
++
++ jQuery(e.target).find('.ColorCell:visible').hover(function() {
++ sync_highlight(this);
+ });
+
-+ // Sync selected color
++ // Sync highlight and selected color on click
+ jQuery(e.target).find('.ColorCell:visible').click(function() {
++ sync_highlight(this);
+ var style = jQuery('[id^=cke_][id$=_selhicolor]:visible').attr('style').replace(/background-color:([^;]+);/, 'background-color: $1 !important');
+ jQuery('[id^=cke_][id$=_selhicolor]:visible').attr('style', style);
+ });
9: 013d0c6c3c = 9: b3781ab70d Fix main body font color for ckeditor darkmode
10: d616f40ec2 = 10: 7859f3e8bd Tweak marker bg color to make marked text readable for ckeditor darkmode
More information about the rt-commit
mailing list