Skip to content
Snippets Groups Projects
user avatar
Samuel Degueldre authored
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>
3bb892cf
History
Name Last commit Last update