const copyElement = document.querySelector("#copyElement");
copyElement.addEventListener("dblclick", () => {
const selection = window.getSelection();
const range = document.createRange();
range.selectNodeContents(copyElement);
selection.removeAllRanges();
selection.addRange(range);
document.execCommand("copy");
}); 1