From 43e29e5d8fd059f42b3543f3f6ee5e88f68f0c52 Mon Sep 17 00:00:00 2001 From: Dipalee Bhalodia Date: Mon, 13 Aug 2018 10:29:07 +0530 Subject: [PATCH] [FIX] web_editor: restore custom colors feature - The current code found colors in the page which were not custom colors (because we were case-sensitive for hex values) - Applying custom colors font font/background were inverted --- addons/web_editor/static/src/js/editor/rte.summernote.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/web_editor/static/src/js/editor/rte.summernote.js b/addons/web_editor/static/src/js/editor/rte.summernote.js index a1ea02d948c..0e28eb0d237 100644 --- a/addons/web_editor/static/src/js/editor/rte.summernote.js +++ b/addons/web_editor/static/src/js/editor/rte.summernote.js @@ -45,7 +45,7 @@ function _rgbToHex(rgb) { if (!hex) { return rgb; // TODO handle error } - return hex.hex; + return hex.hex.toUpperCase(); }; // Update and change the popovers content, and add history button @@ -471,8 +471,8 @@ $.summernote.pluginEvents.customColor = function (event, editor, layoutInfo, cus onSave: function (color) { var $palettes = $(event.currentTarget).find('.note-custom-color-palette > .note-color-row') .append(('