-
- Downloads
[FIX] web_editor: do not remove default styles
Previously, when copy-pasting HTML with styles on styleable tags, those styles could still be removed by the editor if they had a default value. This was supposed to be a way to keep the DOM clean and lighter. However, styles with default values still serve a purpose when overriding non-default values inherited by their parents. Therefore, removing them was a conceptual mistake. One example in the editor where this purpose can be served is in tables where spans can override the style of the cell or parent span. This commit ensures we no longer remove style attributes because of their default value. Task-3332955 X-original-commit: 0c097311 Part-of: odoo/odoo#124527
Showing
- addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js 3 additions, 13 deletions...editor/static/src/js/editor/odoo-editor/src/OdooEditor.js
- addons/web_editor/static/src/js/editor/odoo-editor/test/spec/copyPaste.test.js 2 additions, 2 deletions...tic/src/js/editor/odoo-editor/test/spec/copyPaste.test.js
Loading
Please register or sign in to comment