[FIX] web_editor: ensure <font> colors are kept properly
Color and background-color styles on `<font>` tags were being wrongly overridden when applying another color or background color to the element. Task-2580158 (cherry picked from commit a532d096faf55550ac6d01795aaa2b6843ebc988)
This commit is contained in:
@@ -498,7 +498,7 @@ export const editorCommands = {
|
||||
// Color the selected <font>s and remove uncolored fonts.
|
||||
for (const font of new Set(fonts)) {
|
||||
colorElement(font, color, mode);
|
||||
if (!hasColor(font, mode) && !hasColor(font, mode)) {
|
||||
if (!hasColor(font, mode) && !font.hasAttribute('style')) {
|
||||
for (const child of [...font.childNodes]) {
|
||||
font.parentNode.insertBefore(child, font);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user