Steps:
- on website or mass_mailing, insert an image via the "/image" command,
- a text node containing "[object HTMLImageElement]" is pasted instead
of the expected content.
Since [1], when inserting a node, the instanceof operator is used to
compare that node to the Editor's document global `Node` object. While
it fixed cases where there was as mismatch of `Node` objects (nodes
created by the top document x nodes created via the iframe's document),
it revealed errors elsewhere. Notably, the MediaDialog inserts an image
node created by the top document, regardless if the editor is mounted in
an iframe.
This commit makes the `insert` command more permissive when resolving if
'content' is a Node or a string.
task-3543003
[1]: https://github.com/odoo/odoo/commit/bfe0c5fedf172f4c77002a4f54803b376ada43ceclosesodoo/odoo#137872
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>