[FIX] web_editor: add color preview to color picker
The web editor offered in-content preview when hovering over a color to change text or background color. This commit implements this behavior with Jabberwocky. closes odoo/odoo#61588 Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -565,6 +565,12 @@ var Wysiwyg = Widget.extend({
|
||||
colorpicker.on('color_picked', this, (e) => {
|
||||
this._setColor(colorpicker, setCommandId, unsetCommandId, e.data.color, $dropdownNode, true);
|
||||
});
|
||||
colorpicker.on('color_hover', this, (e) => {
|
||||
this._setColor(colorpicker, setCommandId, unsetCommandId, e.data.color, $dropdownNode, false);
|
||||
});
|
||||
colorpicker.on('color_leave', this, (e) => {
|
||||
this._setColor(colorpicker, 'undo', 'undo', undefined, $dropdownNode, false);
|
||||
});
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user