Skip to content
Snippets Groups Projects
Commit 3bb892cf authored by Samuel Degueldre's avatar Samuel Degueldre
Browse files

[FIX] web_editor: fix icons losing classes when modifying them

Previously, when double clicking and image, video, icon, or document in
the web-editor and replacing it with a different media type, it would
lose its custom classes. This means among other things, that it would
lose margins and paddings from bootstrap classes, or in the case of the
three columns snippet, that the new media would not be properly rounded
in its top corner, or not show up at all in the case of the video. The
only exception was when changing any media type to an icon, but in that
case it would also keep some of the media-specific classes that are
supposed to be removed (eg img-fluid or media_iframe_video).

This commit fixes that as well as some _clear behaviour that didn't
remove all classes that had to be removed, eg some fa-classes would
linger depending on their order, and the o_image class from documents
would always remain

Part of https://github.com/odoo/odoo/pull/64234


task-2282542

closes odoo/odoo#64234

X-original-commit: 99531f5d
Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
parent 398259c9
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment