Before this commit, following this flow in the Website Builder:
- Enter edit mode,
- Drop a snippet with text,
- Paste a youtube video link,
- Click on the "Embed Youtube Video" option of the powerbox,
=> There is a traceback.
This is coming from the bad function calls in the Wysiwyg to create a
video node.
When [1] reworked the MediaDialog in owl, a first implementation was
done exporting some utils (saveVideos, videoSpecificMediaClasses). But
this implementation was not kept and later changed to use static methods
and properties on the VideoSelector class (createElements and
mediaSpecificClasses).
Unfortunately, the outdated util methods used in the Wysiwyg were not
changed, and it was breaking the youtube video instertions.
This commit changes the Wysiwyg to use the existing
VideoSelector.createElements and VideoSelector.mediaSpecificClasses
static method and property to fix this flow.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
closesodoo/odoo#105475
X-original-commit: 4923c20c29170407d43908f983f2a168241f4817
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Younn Olivier (yol) <yol@odoo.com>