Thanks for this amazing editor.
If you click clone on the body it gets cloned. u will get more than 1 body tag.
checking if the tagtName == BODY helped me.
cloneNode: function (node) {
if (!node) {
node = Vvveb.Builder.selectedEl;
}
if (node.tagName == "BODY") return; /here
clone = node.cloneNode(true);
node.after(clone);
node = clone.click();
element = clone;
Vvveb.Undo.addMutation({
type: "childList",
target: node.parentNode,
addedNodes: [element],
nextSibling: node.nextSibling,
});
}
Thanks for this amazing editor. If you click clone on the body it gets cloned. u will get more than 1 body tag. checking if the tagtName == BODY helped me.