[FIX] web_editor: paste multiline

Inserting text that contain multiline does not work.
One "\n" is removed.
Two "\n" become only one.

Task ID: 2602881

closes odoo/odoo#73835

X-original-commit: 89450137653526d9947bc21410cc4163e8b9b440
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
This commit is contained in:
Nicolas Bayet
2021-07-16 09:55:23 +00:00
parent c369232454
commit 6ab81fe053
@@ -94,7 +94,7 @@ function insert(editor, data, isText = true) {
} else {
startNode.after(nodeToInsert);
}
if (isShrunkBlock(startNode)) {
if (startNode.tagName !== 'BR' && isShrunkBlock(startNode)) {
startNode.remove();
}
startNode = nodeToInsert;